[Samba] change user home

Rowland Penny rowlandpenny at googlemail.com
Fri Nov 1 09:47:28 MDT 2013


On 01/11/13 15:39, Marc Muehlfeld wrote:
> 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
> muehlfeld:*:1061:513::/home/muehlfeld:/bin/false
>
>
> And if I change the path:
>
> # grep "template home" /etc/samba/smb.conf
>      template homedir = /home/someTestString/%U
>
> # getent passwd muehlfeld
> muehlfeld:*:1061:513::/home/someTestString/muehlfeld:/bin/false
>
>
>
> # winbindd --version
> Version 4.1.0
>
>
>
> Regards,
> Marc
>
AH, but is this the winbind that is built in to the samba daemon? what 
does 'ps ax | grep winbind' show?

If windbind is running then you are running as a client much the same as 
Samba 3.6

The built-in winbind has nowhere near the capabilities of the S3 
winbind, not being able to change the home directory is one of them.

Rowland


More information about the samba mailing list