Click to See Complete Forum and Search --> : Samba shares home dir twice
skubiszm
07-09-2003, 05:19 PM
Hey there,
I am currently running RH 8.0 with Samba 2.2.7-2. Now when I browse to my linux box from a Windoze machine I get two home directories, one is calles home/ the other is my user name, skuba/. Now I messed around with the smb.conf file a bunch, manually and using SWAT and I can't get rid of it.
Also, one more thing. I read some tuturial some where that I can automatically log in through samba using my windows account name and password, but I can't seem to find the web page. If some one knows a page like that and let me know, that would be great.
I have attached the smb.conf file.
-Matt
cowanrl
07-09-2003, 07:14 PM
As far as seeing your home directory twice from Windows, add the line:
browseable = no
to the [homes] share definition.
Don't forget to restart Samba after you do and wait 10 to 15 minutes to let the Windows browse list settle down.
For you next question, it's not really clear to me just exactly what you want to do.
Do you want to automatically access the shares on your Windows machines from Linux when it boots up? If so, click on the little Library button at the top of this page, select File Systems, then select Connecting to SMB Shares from Linux or Mounting smbfs Shares Permanently. They offer 2 different methods to accomplish the same thing.
homey
07-09-2003, 10:43 PM
I'm using my Redhat box as a PDC and log onto it from W2k and redhat clients. Works pretty slick. :)
This site has an excellent tutorial on samba....
http://www-1.ibm.com/servers/esdd/tutorials/samba/index.html
skubiszm
07-21-2003, 11:39 PM
Thanks for the fix for the 2 home shares. Just to clarify, what I have right now is my window user name and password are the same as an account I made on my linux box. Now when I browse to the linux box from my windows machine it still asks me for a username and password. So I just enter my windows user name and password and everything works fine. Now at work we have a sun box at work and I was actually able to set my password on the linux share through windows and its automatically logs me in. I think I was reading that this is only possible be linux syncs itself with a windows domain server to resolve the password and since I am not running a windows domain at home I am not able to do this also. So I guess my question is there a way to set this up without using a windows domain? Thanks.
-Skubiszm
cowanrl
07-22-2003, 12:50 PM
The main reason it's prompting you for a username and password is because you have security = share in your smb.conf but you have valid user = skuba for your stuff share.
Since this is your home network and you'll never be using hundreds of user accounts, change it from security = share to security = user. Then execute this command as root:
smbpasswd -a skuba
When it prompts you for a password, enter the same password that you use for that account in Windows.
After you restart Samba, you should be able to access the Samba shares on your Linux box from Windows without entering a username/password.
skubiszm
07-22-2003, 02:34 PM
OK, I tried that. But it still asks me for a user name and password each time I try to access the share. I guess I could use that "remember password" flag, but I am not a big fan of that. I am trying to access it from an XP box if that makes a difference.
-Matt
cowanrl
07-22-2003, 03:51 PM
Are you using XP Home or Pro?
My XP machine here is Pro. It is a member of a Win2k Domain.
I'm running Samba on Red Hat 9. I set the workgroup name in the smb.conf file the same as the name of the Win2k domain. I have it set to security = user and I have usernames set up the same as I told you to do.
I can browse the Samba machine from my XP machine. I can map drives to it from Explorer or using netview at the command line and it never prompts me for a password.
If you are using XP Home, there may be an issue with how it sends the username and password when it initially connects. I've never used XP home in a situation like this before.
Do you have the workgroup name in smb.conf the same as you have in XP?
You don't have an exclamation point in your password do you? I've had that give me fits in Linux before.
If you execute:
net use q: \\skuba\stuff
from the command line on your XP machine, does it prompt you for a password there also?
skubiszm
07-23-2003, 01:06 PM
I think the problem is I am not using a windows domain, just a simple workgroup. Thats the only difference I see.
cowanrl
07-23-2003, 01:43 PM
My experience with XP workstations accessing a Samba server has always been with the XP machines being a member of a domain, whether a Samba PDC, an NT Server PDC or a Win2k AD domain.
I have used NT 4 Workstations that were a member of a workgroup to access a Samba server. As long as the workgroups were the same and the username/passwords were the same, I never had it prompt me for a password when I accessed a share.
It could be that XP initially presents the username/password in a way that Samba doesn't understand and it has to prompt for a username/password.
It almost acts like at some time you selected to connect as a different user on your XP machine and it is remembering that and using it when it initially connects.
Just for testing purposes, did you try creating a different user on the XP machine and the Linux machine and trying it?