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

userPassword in PHP



Hello peoples,

I'm trying to create a user in LDAP using ldap_add() of PHP 4, but I'm having 
a problem. I don't know how to store the userPassword using a MD5 hash.

I tried by some ways:

$ldapdata['userPassword'] = md5($password);
$ldapdata['userPassword'] = '{MD5}' . md5($password);
$ldapdata['userPassword'] = "{MD5}$password";

Nothing worked.

On the first two ways, the password goes encrypted to base, but when I try to 
authenticate, the password does not check.

Using ldap_add from shell, I always get success.

Any helps are welcome.

Merry christmas.

-- 
MARLON DUTRA
Debian-RS
http://people.debian-rs.org/~marlon/
ICQ: 2795383
GnuPG ID: 3E2060AC pgp.mit.edu