[Samba] How can I create a ntlm-hash with Java

Volker Lendecke Volker.Lendecke at SerNet.DE
Sat Jun 14 21:05:29 GMT 2008


On Sat, Jun 14, 2008 at 06:35:37PM +0200, M. Mueller wrote:
> i would like to create all my LDAP-Entries with a Java servlet. The only 
> thing that stops me are the ntlm hashes (sambaLMPassword and 
> sambaNTPassword). Can anybody tell me if there are any Java sources that 
> create these values from a cleartext password or where in the samba 
> sources they are calculated so I can port the algorithm to java? I 
> searched the net for jacifs, which I heard should have coded that, but 
> couldn't find it. It was certainly a bit naiv to think that smbpasswd.c 
> would be the source file I needed.
> Can anybody point me to the right source?

If you can live with lgpl'ed code you might look at
./jcifs/smb/NtlmPasswordAuthentication.java from the jcifs
code.

Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba/attachments/20080614/99db476b/attachment.bin


More information about the samba mailing list