[Samba] winbind: homeDirectory being ignored

Rowland Penny rowlandpenny at googlemail.com
Tue Jun 24 09:28:53 MDT 2014


On 24/06/14 16:17, Brian Candler wrote:
> Grr... gid mapping has just started working. Looking back through my 
> history:
>
> root at adclient:~# getent passwd user8
> user8:*:1008:70001:user8:/home/ADTEST/user8:/bin/bash
> ...
> root at adclient:~# service winbind restart
> winbind stop/waiting
> winbind start/running, process 29463
> root at adclient:~# ls /var/cache/samba/
> browse.dat  gencache.tdb  netsamlogon_cache.tdb  printing
> root at adclient:~# rm /var/cache/samba/*.*
> root at adclient:~# service winbind restart
> winbind stop/waiting
> winbind start/running, process 29523
> root at adclient:~# getent passwd user8
> user8:*:1008:1008:user8:/home/ADTEST/user8:/bin/bash
>
> Maybe it *was* the cache cleaning which fixed it.
>
> At least: I now have the group ID correct - this still doesn't use the 
> homeDirectory.
>
> But on a hunch, based on what I saw in debug logs, I changed the 
> attribute from "homeDirectory" to "unixHomeDirectory" and it worked!
>
> So the question now is: what's broken? Should "samba-tool user add ... 
> --home-directory" be setting unixHomeDirectory? And why is this 
> non-RFC2307 name being used?
>
> Regards,
>
> Brian.
>
samba-tool is 'broken' (using your word here) in several ways when it 
comes to creating users and groups AND when/if you carry out a 
'classicupgrade' , it adds the posix objectClasses.

As to your problem, you need to modify samba-tool slightly to get it to 
add the 'unixHomeDirectory', see the tarball that I have attached.

The other problem is keeping track of just what uid/gidNumber's you have 
used, this is not a problem if you use ADUC, the first time you use 
this, the attributes that microsoft supplies to store the next 
uid/gidNumbers get populated, so if microsoft can do it, why not samba-tool.

Rowland







More information about the samba mailing list