Bug 7023 - unable to login when username is with underscore like b_user
Summary: unable to login when username is with underscore like b_user
Status: NEW
Alias: None
Product: Samba 3.3
Classification: Unclassified
Component: Winbind (show other bugs)
Version: 3.3.9
Hardware: x86 Linux
: P3 major
Target Milestone: ---
Assignee: Guenther Deschner
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-07 03:21 UTC by Moshe Levi
Modified: 2018-12-09 19:05 UTC (History)
4 users (show)

See Also:


Attachments
samba config (2.08 KB, text/plain)
2012-10-12 08:42 UTC, Ladislav
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Moshe Levi 2010-01-07 03:21:04 UTC
Hi moshe,

> 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
> underscore.
>
> 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 samba@lists.samba.org and
file a bug at bugzilla.samba.org
Comment 1 Ladislav 2012-10-12 08:42:46 UTC
Created attachment 8047 [details]
samba config

samba config
Comment 2 Ladislav 2012-10-12 08:42:52 UTC
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.
Comment 3 higuita 2013-01-28 17:53:52 UTC
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 
xerox_m118:*:113274:70513:Xerox m118:/home/DOMAIN/xerox_m118:/bin/false

# id xerox_m118
id: xerox_m118: No such user

# wbinfo -u | grep xerox_m118
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
xerox_m118:*:113274:70513:Xerox m118:/home/DOMAIN/xerox_m118:/bin/false

# wbinfo -U 113274
S-1-5-21-218446187-2021206341-1862565094-43274

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.