So I should start by saying that I did this successfully less than a week ago and I had no trouble but I have since reformatted and reconfigured my server and now I'm having the hardest time remembering how I did it.
Here's what I had before and what I am trying to accomplish again. I had a public samba share on Ubuntu server. Anyone on my network could access the share and it's contents simply by typing \Hostname. No password necessary. Users who were not on the share's workgroup had read access but users who were on the workgroup had read/write access. (Windows 7)
Now, if I try to connect to \Hostname I'm prompted for a username and password. If I enter the un pw I get full access but I shouldn't have to; my current settings are...
security = user map to guest = bad user [Shares] path = /home/shares available = yes read only = no browsable = yes public = yes writable = yes guest ok = yes
I'm pulling my hair out over this one. Any suggestions?
Ugh, this is giving me such a hard time. I'm so close.
Here's what I've got.
I can get to the share from Windows 7 by going to start and typing \Hostname\Sharename but I'm prompted for a username and password. I cant just leave it blank though because it will use my workgroup as the domain; so I enter \ for the username to clear it out and log in with a blank username and password. Great now I can access the files in the share.
Once I'm in, The workgroup configuration is working properly. If I'm on a computer with the the default WORKGROUP I can read and execute; a computer on my Home workgroup can read write and execute. So that's working.
The problem is, It shouldn't be asking for a password at all. It should be totally public to anyone on the network. I'm trying to share it with XBMC and it's not even showing up under smb in the file manager. I cant access it manually from XBMC either. I get a connection refused error.
Still pulling hair out over this. The worst part is the first time I did this about a week ago, I spent about 30 minutes on it and it worked perfectly. Now I've probably spent at least 4 hours and it's still not working.
Testparm: Load smb config files from /etc/samba/smb.conf rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384) Processing section "[printers]" Processing section "[print$]" Processing section "[Shares]" Loaded services file OK. Server role: ROLE_STANDALONE Press enter to see a dump of your service definitions [global] workgroup = FELLOWSHIP server string = %h server (Samba, Ubuntu) map to guest = Bad User obey pam restrictions = Yes pam password change = Yes passwd program = /usr/bin/passwd %u passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* . unix password sync = Yes syslog = 0 log file = /var/log/samba/log.%m max log size = 1000 socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 dns proxy = No wins support = Yes usershare allow guests = Yes panic action = /usr/share/samba/panic-action %d idmap config * : backend = tdb [printers] comment = All Printers path = /var/spool/samba create mask = 0700 printable = Yes print ok = Yes browseable = No [print$] comment = Printer Drivers path = /var/lib/samba/printers [Shares] path = /home/shares read only = No guest ok = Yes
UPDATE: So, the share is now available across my network regardless of the work group. Any Windows user who connects to my network can see the NAS under Netowork and access it. The key was setting security to security = share. I know, it's deprecated, but it works and security = user and map to user = bad user wasn't working for me.
Anyway, now it seems that anyone who connects to the share get's unix global permissions for the directory, which is manageable, but I want users that are joined to the workgroup specified in smb.conf to get unix group permissions.
This way, I can set the directory to 775 and I will be able to write because I am joined to the workgroup but other users can only read and execute.