Charles Collicutt
2004-Jun-21 20:50 UTC
[Samba] Anonymous access to Samba share with Windows XP Home
Hi, I've searched the HOWTO and searched with Google for an answer to my problem but to no avail. I hope it's not too obvious. I have a Linux box running Samba 3.0.4 and a Windows XP Home box on my local network. I would like to share the home directories on the linux box and I would also like a share that is accessible anonymously with no password. My smb.conf contains the following: #======================= Global Settings [global] workgroup = MYWKGRP server string = Charles' Desktop netbios name = Encre security = user hosts allow = 192.168.0.0/24 127.0.0.1 hosts deny = 0.0.0.0/0 log file = /var/log/samba/%m max log size = 50 socket options = TCP_NODELAY passdb backend = tdbsam #============================ Share Definitions [homes] comment = Home Directories browseable = no writable = yes [audio] comment = Charles' Audio Files path = /home/charles/audio force user = charles force group = users read only = No guest ok = Yes #=========================== I can connect to the audio share using smbclient -U guest //encre/audio on my linux box without providing a password, which is exactly what I want. However, net use \\encre\audio "" /u:guest fails on the WinXP box, claiming that it is an invalid username or password. Browsing in Explorer fails similarly. I can solve this by adding an account to my Samba password file whose username matches the username on the WinXP box. However, the whole point of this share is to allow anyone connected to my local network access to my audio share - I don't want to have to add users for every laptop that comes into wireless range, for example. Why can't the WinXP box connect anonymously when smbclient on the Linux box can? Thank you very much for any help you can provide. -- Charles
Scott Serr
2004-Jun-21 22:20 UTC
[Samba] Anonymous access to Samba share with Windows XP Home
I think XP is confused on sets of credentials. If you have any connection to a server as a named user with a password, then subsequent connections "want" to be that user/password. Once (long ago, 1999?) I got around something like this by declaring a "NETBIOS alias" in smb.conf and connecting to the same server with the alias name for the second share. Might work. Other thing to look at: Do anonymous shares work with security=user? Maybe just security=share? -Scott Charles Collicutt wrote:> Hi, > > I've searched the HOWTO and searched with Google for an answer to my > problem but to no avail. I hope it's not too obvious. > > I have a Linux box running Samba 3.0.4 and a Windows XP Home box on > my local network. I would like to share the home directories on the > linux box and I would also like a share that is accessible > anonymously with no password. > > My smb.conf contains the following: > > #======================= Global Settings > > [global] > workgroup = MYWKGRP > server string = Charles' Desktop > netbios name = Encre > security = user > hosts allow = 192.168.0.0/24 127.0.0.1 > hosts deny = 0.0.0.0/0 > log file = /var/log/samba/%m > max log size = 50 > socket options = TCP_NODELAY > passdb backend = tdbsam > > #============================ Share Definitions > > [homes] > comment = Home Directories > browseable = no > writable = yes > > [audio] > comment = Charles' Audio Files > path = /home/charles/audio > force user = charles > force group = users > read only = No > guest ok = Yes > > #===========================> > I can connect to the audio share using > smbclient -U guest //encre/audio > on my linux box without providing a password, which is exactly what I > want. > > However, net use \\encre\audio "" /u:guest fails on the WinXP box, > claiming that it is an invalid username or password. Browsing in > Explorer fails similarly. > > I can solve this by adding an account to my Samba password file whose > username matches the username on the WinXP box. However, the whole > point of this share is to allow anyone connected to my local network > access to my audio share - I don't want to have to add users for > every laptop that comes into wireless range, for example. > > Why can't the WinXP box connect anonymously when smbclient on the > Linux box can? > > Thank you very much for any help you can provide. >