shared folders in samba
one of my clients wants to create a shared folder so only wendy and pierre can access and write to it. can someone please explain to me on how it will be done. this is what i created in my smb.conf.
writeable = yes
public = no
guest ok = no
path = /home/samba/private
valid users = pierre, wendy
write list = pierre, wendy
They also use domain logins. I created the share "private". What i think i should do is to add pierre and wendy to the ownership of private, but i dont know how to add both users. this is what i will do to add wendy to the ownership. chown wendy private.
How can i add wendy and pierre. Is there also a better alternitive.
To do this you need a mix of unix permissions and domain authentication.
Firstly, make sure the samba server is set to 'user' level security and that it uses encrypted passwords (these are set in the 'general' section above the shares).
Then make sure that the users 'pierre' and 'wendy' have been added as users in samba (with 'smbpasswd -a pierre' and again for wendy). And make sure their passwords are set to be identical to their windows passwords.
Now make sure the users have unix accounts on the Linux machine. If the usernames are different you can map them in the samba config.
Edit /etc/group and add a new group, something like 'poweruser', add the users 'wendy' and 'pierre' to it.
Set the group ownership of /home/samba/private to 'poweruser', with 'chgrp poweruser /home/samba/private', and change the permissions with 'chmod 770 /home/samba/private'.
In the samba [private] declaration add 'force group +poweruser' to make all members of that group write files using the group tag. Everyone else should be denied read and write access 'cos they're not already in that group.
You might also want to change the 'write list' entry to be 'write list = @poweruser', to make admin easier later if you add anyone to that list.
Now restart samba and have your users log on again to windows, and it should work. Try it, and if it doesn't, then come back here and complain, and I (or someone better than I) will try to fix it.
thank you. It works.
I've been trying to do this for 2 days now.
I oh you one :)