[Samba] NTLM hash

David Busby busby at edoceo.com
Tue Feb 8 01:31:24 GMT 2005


I'm looking at the NTLM hash, I need to make my own.
I was going to look at somehow using libsmb or something but don't 
really know how to.  Can I do this in perl?  I can make Unicode scalars 
and send those to md4_hex() to get the output, but I cannot get 
something to match what shows up in the /etc/samba/private/smbpasswd 
file.  Ideas?  Currently I try this:

#!/usr/bin/perl -w

use strict;
use Digest::MD4 qw(md4_hex);
use Unicode::Map;

my $map = new Unicode::Map("ISO-8859-1");
print md4_hex($map->to_unicode("password"));
print "\n";

# end

/djb


More information about the samba mailing list