Producing LM/NT Hashes

Jeremy Allison jallison at whistle.com
Sat Jun 20 08:51:33 GMT 1998


Andrew Perrin - Demography wrote:
> 
> Greetings Samba gurus-
> 
> Basically, we're in need of a tool that will take as input a cleartext
> password and produce, as output, the LM and NT hashes for an smbpasswd
> file.  This would be used in conjunction with some specialized scripts for
> password changing on our network.  We've been hacking around in the
> smbpasswd source with no luck whatsoever -- we just keep getting what
> looks like garbage on the output when we try to use what seem like the
> right functions in our code.
> 

The functions you need are :

E_md4hash - to create the 16 byte UNICODE hash. This is in smbencrypt.c

E_P16 - to create the 16 byte Lanman hash (remember to uppercase
first). This is in smbdes.c

Cheers,

	Jeremy.

-- 
--------------------------------------------------------
Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.
--------------------------------------------------------


More information about the samba-technical mailing list