Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
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.

share|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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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