[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Help needed to migrate htpasswd APR1 hash to OpenLdap



Hi,

it has been too long since I've done some serious brain-breaking over this, but the md5(salt+password) (or something derived from it) is clearly in the first 16 bytes of the LDAP-form ({APR1}FK7q3pAf80k0Wh9BYZJ0FHBlcHBlcm9u) hash:

% echo "FK7q3pAf80k0Wh9BYZJ0FHBlcHBlcm9u" | base64 -d | hexdump -C
00000000  14 ae ea de 90 1f f3 49  34 5a 1f 41 61 92 74 14  |.......I4Z.Aa.t.|
00000010  70 65 70 70 65 72 6f 6e                           |pepperon|
00000018

As for how this relates to the apache md5 form, you'll probably have to do a critical reading of http://cpansearch.perl.org/src/RSAVAGE/Crypt-PasswdMD5-1.40/lib/Crypt/PasswdMD5.pm - it appears to do some pretty funky transformations.

Best,
Luke

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature