[jcifs] Re: Quick question about the username field.

Christopher R. Hertel crh at ubiqx.mn.org
Wed Oct 16 15:37:17 EST 2002

On Wed, Oct 16, 2002 at 12:53:01AM -0400, Allen, Michael B (RSCH) wrote:
> You mean just on the wire.

Yeah.  In the SessionSetupAndX.

> Usernames are case insensitive but Win9x requires uppercase.

So usernames *are* case-sensitive under W/9x.  That's got to be true in 
pass-through auth mode only.  It's not an issue with share-mode 
authentication (which is what W/9x defaults to if there's no DC).  Testing 
here showed that case wasn't important, but then the username really isn't 
important at all with share-level security.

The thing is, I didn't see smbclient up-case the username ever.  I may 
have to dig into the code, though.  I have this vague memory of Jeremy 
complaining about having to retry connections because Windows was 
inconsistent about something like this.

> That's why we unconditionally upcase internally. There might be a 
> benifit to suppying usernames in the original case. If you find one
> please let me know.

On a Unix system, crh and CRH and cRh may not be the same.  I'm not sure, 
though.  I've never tried it but I vaguely recall that older Unixes would 
count them all equivalent so that very old terminals that only did 
upper-case (yes, there were such things) would still be usable.


Just FYI, in my testing against a Samba server (running with share 
level security and forcing plaintext passwords):

- smbclient left both username and password lower-case.
- jCIFS up-cased only the username.
- Win/95 upcased both username and password.


Chridz -)-----

Samba Team -- http://www.samba.org/     -)-----   Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/   -)-----   ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/     -)-----   crh at ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/    -)-----   crh at ubiqx.org

More information about the jcifs mailing list