[python-ldap] Create a LDIF file with SSHA passwords

Michael Ströder michael at stroeder.com
Mon Sep 7 12:05:18 CEST 2015


Sébastien Douche wrote:
> I want to create users in a file (with a LDIFParser class, user names
> come from an another LDIF file). By defaults, the parser seems to write
> simple text password. How to write SSHA password?

The LDIFWriter simply outputs raw binary strings in text representation
compliant to [1].

If you want to generate salted SHA-1 password then simply generate them
according to [2] and then write LDIF output.

Ciao, Michael.

[1] https://tools.ietf.org/html/rfc2849

[2] https://tools.ietf.org/html/draft-stroeder-hashed-userpassword-values

--
Michael Ströder
E-Mail: michael at stroeder.com
http://www.stroeder.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4272 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20150907/559a869c/attachment.bin>


More information about the python-ldap mailing list