importing users into openldap, with already existing passwds
I wrote a script to create an ldif file out of a list of usernames and md5 passwds from a psql db, that I use for apache auth. But their original passwords are not working.
The usernames are just a list, and the passwds are just a list in md5 format as well. They are importing correctly, and I can see them in phpldapadmin in the correct area as all the other users. Here is an example of one of the ldif files I am importing as a test: Code:
dn: uid=test5,ou=Users,dc=corpedia,dc=internal Code:
[kylec@heracross tmp]$ ldapadd -H ldaps://*******.*******.internal -x -D "cn=admin,dc=**********,dc=internal" -f ldaptest.dif -W Here is what I see in the ldap log as the user tries to authenticate via apache mod_ldap with his original md5 passwd from psql, he fails. Code:
>>> dnPrettyNormal: <uid=test6,ou=Users,dc=corpedia,dc=internal> Code:
[kylec@********* ~]$ ldappasswd -D "cn=admin,dc=********,dc=internal" -W -H ldaps://********.********.internal -x "uid=test5,ou=Users,dc=********,dc=internal" Any ideas? Is the format possibly wrong for that md5 line? Can I even do what I'm trying to do? Thanks for any help! |
something that I just realised, for some reason openldap is encoding the password differently.
With phpldapadmin I created a user with an md5 passwd the same as the one I was using before and it was encoded differently I believe. (I changed like 1 char in each because its a used pass, but you can see how they are different) {MD5}KzoYWAgMXC75tbgTpqOx6x== {MD5}2b3a1858080c5c2ef9b5b813a6a3b1ea Does anyone know what I can do about this? |
All times are GMT -5. The time now is 04:22 PM. |