[Samba] change user home

Marc Muehlfeld samba at marc-muehlfeld.de
Fri Nov 1 09:39:49 MDT 2013

Hello Rowland,

Am 01.11.2013 14:20, schrieb Rowland Penny:
> According to 'man smb.conf' on the S4 server, "winbind nss info =
> template" is the default, so does not need to be added. If you add
> 'template homedir = /home/%U' to smb.conf and restart samba4, then run
> 'getent password rowland' you get this:
> HOME\rowland:*:10000:100:Rowland Penny:/home/%U:/bin/bash
> Yep, you get a literal %U, how does this differ from 'the home directory
> is hard coded' if winbind does not recognise %U as the place to put the
> username?

Here it works like expected and described in the manpage. %U is resolved 
into the username:

# grep "template home" /etc/samba/smb.conf
      template homedir = /home/%U

# getent passwd muehlfeld

And if I change the path:

# grep "template home" /etc/samba/smb.conf
      template homedir = /home/someTestString/%U

# getent passwd muehlfeld

# winbindd --version
Version 4.1.0


More information about the samba mailing list