[jcifs] Can't log in to Samba with plaintext/Unicode.

Christopher R. Hertel crh at ubiqx.mn.org
Wed Dec 25 16:54:21 EST 2002


The combination of plaintext password support and Unicode is unusual to 
say the least.  If the client supports Unicode then it almost certainly 
supports encrypted passwords.  Likewise for the server.

Still, I test odd things.  I like the cusps and the dark corners.

It is possible to run the Samba HEAD development code in a mode which
combines Unicode with plaintext passwords.  In my testing, I found that
W2K can't log on to Samba in this mode (possibly Samba's fault) and
neither can jCIFS.  The problem is that jCIFS (0.7.0b11) fails for a very
different reason, and I think that it's something that needs to be fixed
if only for the sake of pedanticism.

The problem is this:  jCIFS is correctly converting the password into
Unicode, but it is then listing the password as the ANSI password, not the
Unicode password.  It is giving an ANSI password length
(CaseInsensitivePasswordLength) value of 14, which is the correct length
but in the wrong field.

There are some other oddities.  I note for example that W2K puts the
length value into the correct place (CaseSensitivePasswordLength), but
gets the value wrong.  It claims the password is 12 bytes long, and
ignores the two terminating nul bytes.  Ooops.  Unfortunately, that throws
Ethereal off and the rest of the packet doesn't get parsed right.

Capture attached.  Don't worry, I used a temporary password and changed it 
after the tests.  :)

Chris -)-----

-- 
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Mike_Unicode_Plaintext.cap.gz
Type: application/x-gunzip
Size: 1166 bytes
Desc: not available
Url : http://lists.samba.org/archive/jcifs/attachments/20021224/1b5c4c74/Mike_Unicode_Plaintext.cap.bin


More information about the jcifs mailing list