patch to add "winbind domain before username" parameter, and bugfix for handing of template homedir

rick at microway.com rick at microway.com
Sun Nov 17 14:44:42 MST 2013


Hi All,

Using samba4, I have now had a problem where the usernames pulled from
winbind all had the domain name prepended to them.  I found a bug report
from a couple years ago of someone complaining of the opposite, and the
code was changed at that time to prepend "DOMAIN\user" instead of just
"user".

I have made a patch now to add the smb.conf global parameter:
"winbind domain before username".  I have it defaulting to true to preserve
the current behavior, but if you set it to false/no you will get just the
regular username from both wb_cmd_getpwnam.c and wb_cmd_getpwuid.c

Also, I have found a bug in the "template homedir" parameter. The manpage
and docs I've read all refer to using %D to represent the domain, and %U
to represent the username. However, the code was actually using
%WORKGROUP% and %ACCOUNTNAME%.  I left the handling for those 2, but added
in the %D and %U as referenced elsewhere.

This patch handles both the new feature and the bugfix.

Thanks,
Rick Warner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: samba4-add-domainbeforeusername-param.diff.gz
Type: application/gzip
Size: 2406 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20131117/755b135e/attachment.bin>


More information about the samba-technical mailing list