Unix password sync and mixed-case usernames

Andreas Haumer andreas at xss.co.at
Sat Jun 2 19:55:09 GMT 2001


I found a problem with samba 2.2.0 working on Linux as PDC
for a NT domain.

In that specific installation, all usernames have their
first character in upper-case (like "User"). (don't
ask, that wasn't my idea...)

With this setup, there is a problem when the user tries
to change his password from the NT workstation with 
unix password sync active: At the beginning of function 
chgpasswd.c:chgpasswd(), there is a call to strlower(name), 
which changes the username to all lowercase. After that
change, the passwd chat sequence of course fails, as the
unix passwd command complains about an unknown username!

As a first fix, I just commented out the call to strlower(),
and now syncing passwords between Samba and Linux works
fine, even with mixed case usernames.

I do not quite understand why the username has to be strlowered
there, anyway. At that point, checks of username were 
already done in function _samr_chgpasswd_user() and there is only 
the unix password sync left to do. So why change the username
string here? I would suggest to just delete the call to strlower()

Any comments?

- andreas

Andreas Haumer                     | mailto:andreas at xss.co.at
*x Software + Systeme              | http://www.xss.co.at/
Karmarschgasse 51/2/20             | Tel: +43-1-6060114-0
A-1100 Vienna, Austria             | Fax: +43-1-6060114-71

More information about the samba-technical mailing list