How do I define a samba share so that every user can only see its own home?
I think you should change valid users = ashley joe %S
to only valid users = %S
. In your example, ashley, joe and %S [the name of the share]
is always valid, so ashley
and joe
can reach all homes, any other (if there are) users should only see their own in the example you gave.
Related videos on Youtube
Patryk
Software Engineer C++/Go/shell/python coder Linux enthusiast Github profiles: https://github.com/pmalek https://github.com/pmalekn
Updated on September 18, 2022Comments
-
Patryk over 1 year
I would like to make every user's home directory from Debian machine to be available by its owner only (using Samba) but for now (with default Samba configuration) I can access other users
/home
s.Here is the
[home]
config part :[homes] comment = Home Directories browseable = no public = no read only = no create mask = 0700 directory mask = 0700 valid users = ashley joe %S
By logging on ashley's account from Windows 7 machine I can browse joe's home. How should I configure this ?
-
Jontas about 12 yearsFor others finding this via google %S is the name of the Current share's name, see oreilly.com/openbook/samba/book/appc_01.html#appc-88529 for a list of all varaibles