The Samba-Bugzilla – Bug 7023
unable to login when username is with underscore like b_user
Last modified: 2018-12-09 19:05:08 UTC
> My name is moshe and I am using samba to join Active Directory.
> I am using samba 3.3.9 release on RedHat Server 5.3 OS.
> The Active Directory is on windows 2008 R2.
> I hope you can help with the issue:
> I am able to join the domain of the Active Directory.
> also I am able to logging to the linux box if I define the user in the
> Active Directory without
> underscore for example moshe.
> Until here everything is working great.
> The problem is if I define the user with underscore for example b_user
> Then I am not able to login.
> I get an error the the user don't exist although when I do wbinfo -u I can
> see him.
> It look like samba is not able to map uid when the usename is with
> I look in the release note for Samba 3.3.9 and it written that you fix the
> Fix trust relationships to windows 2008 (2008 r2)
> I just wonder if you encounter this issue.
No I haven't seen this, but be a bug then.
> Also how stable do you think samba to work with windows 2008 r2
I'm not aware of any problems with Samba >= 3.3.9 or >= 3.4.3
> I really appreciate it if you can help me with this issue.
In future please ask questions on email@example.com and
file a bug at bugzilla.samba.org
Created attachment 8047 [details]
Hello, I have similar problem. We have filled rfc2307 extension for users in AD to use them in Samba. Everything if working as I could get them with "getent passwd" and also use theirs unix UID on files/dirs. But when I am accessing to share with user that have underscore in username like this: name_surname than is not possible to login to share. When I use user without underscore is it possible an it is working as I have expected. Our version of Samba is 3.6.7.
I had a similar problem, using a debian with version 3.5.6~dfsg-3squeeze8 and configured in nsswitch.conf to use winbind (so i can use AD users in apache, for subversion).
I found that the user with "_" is given to the system by winbind, but fail in several commands:
Here one example:
# getent passwd | grep xerox_m118
# id xerox_m118
id: xerox_m118: No such user
# wbinfo -u | grep xerox_m118
# wbinfo -n xerox_m118
Could not lookup name xerox_m118
# wbinfo --user-info=xerox_m118
Could not get info for user xerox_m118
# wbinfo --uid-info=113274
# wbinfo -U 113274
As this worked in the past, i'm reviewing all the last changes i made...
Ok, found the problem, removing this option in smb.conf fixed the problem
winbind normalize names = yes
This is used to convert the AD login names with space to underscore, but breaks the logins names already with the underscore.
I had this line duplicated in the config a few days ago, one with enabling and the other disabling it... you can guess which one i (wrongly) commented out :)
so if you have underscore problems in samba usernames, check the status of the "winbind normalize names" option. Its disable by default and unless you have NO usernames with underscore, leave it that way.