I had a folder on my linux machine that I would like it to be shared as RO to any guest without password requirement but as RW to myself so that (by providing a user/pass) I would be able to alter its contents
The first thing that must be noted is that samba does not allow to share the same folder more than once! So the solution to that was to create a link to this folder and share the original folder as RW for an admin and share the link as RO to everyone else
So if /MYFILES is the original folder you need to do this
ln -s /MYFILES /MYFILESlink
Next use this smb.conf :
[global]
workgroup = WORKGROUP
netbios name = FILESERVER
server string = samba ver. %v
security = user
encrypt passwords = true
map to guest = bad user
guest account = nobody
passdb backend = tdbsam
obey pam restrictions = yes
invalid users = root
[myfilesADM]
comment = Private Share
path = /MYFILES
browseable = no
read only = no
create mask = 0644
directory mask = 0755
valid users = adminuser
[myfiles]
comment = Public Share
path = /MYFILESlink
read only = yes
guest only = yes
guest ok = yes