>This part was contributed, I memory serves me right by Mike Jackson. My
>guess is he just used Perl's MD5 module or a command line md5.
I used ldappasswd to create an md5 password in the userPassword field from
the cleartext word "secret":
userpassword={md5}WPa5t2Ahxs8Y0a3GSxLHpg==
However, the check_ldap() in checkpassword.c fails as follows:
If I type in secret as the cleartext password:
# /home/qmail/bin/qmail-popup localhost /home/qmail/bin/auth_pop pwd
+OK
user <user>
+OK
pass secret
-ERR user record incorrect
check_ldap():password compare was not successful
check_ldap():authdata->s:secret
check_ldap():extra[0].vals[0]->s:{md5}WPa5t2Ahxs8Y0a3GSxLHpg==
If I cut/paste in the md5 password:
# /home/qmail/bin/qmail-popup localhost /home/qmail/bin/auth_pop pwd
+OK
user <user>
+OK
pass {md5}WPa5t2Ahxs8Y0a3GSxLHpg==
-ERR user record incorrect
check_ldap():password compare was not successful
check_ldap():authdata->s:{md5}WPa5t2Ahxs8Y0a3GSxLHpg==
check_ldap():extra[0].vals[0]->s:{md5}WPa5t2Ahxs8Y0a3GSxLHpg==
Perhaps this has to do with the md5 password being encoded in base64. I
tried to use the Python example given to me as follows, but the example goes
in the opposite direction that I need, I think.
# python
Python 2.0 (#1, Apr 11 2001, 19:18:08)
[GCC 2.96 20000731 (Linux-Mandrake 8.0 2.96-0.48mdk)] on linux-i386
Type "copyright", "credits" or "license" for more information.
>>>import base64
>>>base64.decodestring('e01ENX1GNXJVWEd6aXk1ZlBFQ25pRWdSdWdRPT0=')
'{MD5}F5rUXGziy5fPECniEgRugQ=='
>>>
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com