[Samba] Controlling [homes] path to obey /etc/passwd while using winbind

Rowland Penny rpenny at samba.org
Tue May 24 19:28:15 UTC 2022


On Tue, 2022-05-24 at 15:12 -0300, frank picabia via samba wrote:
> Using winbind, security of ADS, I'm finding my path in [homes]
> wants to be /home/MYDOMAIN/username
> according to what is logged.
> 
> When I run 'getent passwd | grep username'
> it returns the proper local passwd entry with the local home
> directory.

That is your problem there, you do not have the same username in
/etc/passwd and AD, you just have them in AD.
if 'fred' is in /etc/passwd and there is a user called 'fred' in AD,
they are NOT the same user and the user in /etc/passwd will be use
before the user in AD.

The default for the user home path in smb.conf is /home/%D/%U, where
'%D' is the DOMAIN and '%U' is the username
> 
> In older samba, %H was working for me, but in Debian Bullseye
> I'm having difficulty.  Omitting path from homes isn't a solution
> either.

If you are using '[homes]' then you must not set the path parameter.

> 
> I really need the home directory from local Linux passwd file
> because my home directories are not as simple as /home/%U

No, you don't, you need to delete all your users from /etc/passwd and
ensure they are created in AD.

> 
> Any ideas?

Please post the output of 'testparm -s'

Rowland





More information about the samba mailing list