how do you configure the smb.conf file, so that each user added to the Samba database has it's own folder, which is not his home folder?

Say I have a folder placed in root, called Samba. Within that Samba folder I want to have a folder for each user. That user will only see his folder, when he logs into the server. However, there has to be a super user who will see the whole folder structure.

How would I accomplish that within the smb.conf file? I couldn't find any good resources on the net.

link|improve this question
feedback

1 Answer

up vote 2 down vote accepted

For the users share create a share with the %U in the path (e.g. path = /srv/folder/%U). Then simply create a separate share setup so only the administrator can access it that points at the parent folder.

See the VARIABLE SUBSTITUTIONS section in the smb.conf man pages.

link|improve this answer
I'm not quite sure, if this is exactly the thing I want. I just can't seem to get it. My smb.conf file hast a section as follow: [share] comment = share folder path = /home/samba/share read only = no valid user = me write list = me read list = me Still it shows me the folder, but I'm not allowed to do anything. – Martin Oct 13 '11 at 23:14
Ok... just for the record. The problem was with the permissions. I added the directories using root, therefore couldn't access them using another user. chown -Rv username userdir helped. Thanks for your help though. – Martin Oct 14 '11 at 6:08
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.