Creating an NT-Password value with python

2009-11-21 Thread jon michaels
Hi list, I am trying to figure out how to create an NT-Password hash for the authentication database using python. I found the package python_ntlm which seems to be able to do the job. http://code.google.com/p/python-ntlm/source/browse/trunk/python26/ntlm/ntlm.py I think it needs a modification

Re: Creating an NT-Password value with python

2009-11-21 Thread Bjørn Mork
jon michaels joniama...@gmail.com writes: Hi list, I am trying to figure out how to create an NT-Password hash for the authentication database using python. I found the package python_ntlm which seems to be able to do the job.

Re: Creating an NT-Password value with python

2009-11-21 Thread jon michaels
Thanks for your quick response, Bjørn. On Sat, Nov 21, 2009 at 4:09 PM, Bjørn Mork bj...@mork.no wrote: I then proceed to add the user in mysql: insert into radcheck (username,attribute,value,op) values ('testuser','NT-Password','\xdb4mi\x1dz\xccM\xc2b]\xb1\x9f\x9e?R',':='); You'll have to

Re: Creating an NT-Password value with python

2009-11-21 Thread jon michaels
On Sat, Nov 21, 2009 at 6:15 PM, jon michaels joniama...@gmail.com wrote: However, I didn't manage to authenticate either of the two. It seems that so far radius likes the value enough to not complain that its invalid. Is the format correct, or is there something else i need to change in my

Re: Creating an NT-Password value with python

2009-11-21 Thread Alan DeKok
jon michaels wrote: Does anyone know a tool i can use to create the right type of NT-Password hash expected by radius? It's an MD4 hash of the password, written as a 32-character hex string. That's it. Using the *binary* form of the MD4 hash is wrong. There are embedded NULs, CRs, LFs,

Re: Creating an NT-Password value with python

2009-11-21 Thread jon michaels
On Sat, Nov 21, 2009 at 10:08 PM, Alan DeKok al...@deployingradius.com wrote:  Use the hex version of the password:        NT-Password := 0x0102030405060708...  Alan DeKok. Thanks, that worked like a charm. As it turns out, i don't even need python_ntlm for more than the right line of code.