[PATCH] [REPOST] mount.cifs: Allow passwords of length upto 127 bytes

Neal A. Lucier nlucier at math.purdue.edu
Thu Jul 3 17:08:18 GMT 2008

Suresh Jayaraman wrote:
> The Windows versions above Windows 98 (Windows 2000, XP and above 
> including Samba), support passwords up to 127 characters. NTLM passwords
> are limited _only_ in GUI, because the dialog box limits it to 14
> characters. So it makes sense for mount.cifs to allow passwords up to
> 127 characters.

This information is incorrect.  The GUI dialog box limits the password length to 
127 characters, not 14.  The 14 character limit is for lanman passwords, and 
Windows will not generate the lanman hash if the password length is over 14 
characters.  The max password length for the actual NTLM hash is 255, which 
windows supports everywhere except the GUI dialog box, so mount.cifs should 
allow passwords up to 255.  As Steve French even demonstrates using the Windows 
command line in this post in response to you:


Samba should have a limit of 14 for lanman and 255 for NTLM because that's the 
specification, and to mimic Windows behaviour it shouldn't generate the lanman 
hash if the password length is greater than 14. However, Samba shouldn't be 
limited by a brain dead choice made my some MS GUI API developers.


More information about the samba-technical mailing list