[global]
security = User
map to guest = Bad User
null passwords = Yes
obey pam restrictions = Yes
# this account must exist as unix users
guest account = smbguest
unix password sync = Yes
# these two are for performance
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=131072 SO_SNDBUF=32768
strict allocate = Yes
[data]
comment = data
path = /data
force user = smbguest
read only = No
create mask = 0666
directory mask = 0777
guest only = Yes
guest ok = Yes
[private]
comment = private
path = /private
valid users = realuser
admin users = realuser
read only = No
guest ok = No
create mask = 0666
directory mask = 0777
# this makes it invisible when browsing the computer
browseable = No
You'll have to add realuser as a username accessible from samba:
sudo smbpasswd -a realuser
But it's a bit tricky because authentication is by users, not shares. So if you want to be able to access the private share (using realuser and its username), as well as the data share (that's open to guests), you'll need to log into both as realuser. Note that in windows 7 the username is \realuser (the backslash is necessary to remove the domain). Note that if you do this only in linux, you'll want to make sure you have the map to guest = bad user line after the security=user line under MacOS to allow access to users who have saved mapped the drives while linux was running.
P.S. - For debugging your smb.conf file, it helps to run testparm -s (which gives warnings and errors).
For debugging windows 7-related issues related to samba, see here.
P.S. - For debugging your smb.conf file, it helps to run testparm -s (which gives warnings and errors).
For debugging windows 7-related issues related to samba, see here.
No comments:
Post a Comment