[Samba] Samba AD and the [homes] share

Rowland penny rpenny at samba.org
Fri Jun 28 09:22:35 UTC 2019

If you read this wiki page:


You will find, under the 'Introduction' heading, these statements:

This documentation does not use the Samba built-in [homes] section that 
dynamically shares the user's home directory using the 
\\server\user_name\ path. While this can be helpful in certain 
scenarios, it has some disadvantages:

     Windows does not support this feature, and certain settings, such 
as folder redirection in an Active Directory (AD), require a workaround 
instead and you cannot use the official solution.
     You must create each new user's home directory manually.
     The [homes] feature is not supported running on a Samba Active 
Directory (AD) domain controller (DC).

There is one very big problem with all that, most, if not all of it just 
isn't true ;-)

Samba does support [homes] , you just have to set up smb.conf and the 
share correctly.

Your users need to be known to the underlying Unix OS and you need this 
in smb.conf:

     template homedir = /home/%D/users/%U

    comment = Home Directories
    browseable = no
    read only = no
    valid users = %S
    root preexec = /usr/local/sbin/mkhomedir.sh %U %H

You also need the script ;-)

If you are prepared to and are able to test the script, I will supply a 
copy, but be aware, we (Louis and myself) will not be liable for 
anything that goes wrong (not that it should). ;-)


More information about the samba mailing list