I'm trying to change user ldap passwords
heres the code
$ds = ldap_connect(LDAP_HOST, LDAP_PORT);
ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
$bind = ldap_bind($ds, 'uid={admin},'.LDAP_BASEDN, '{admin password}');
$userpassword = "{SHA}" . base64_encode(sha1( '{password}', TRUE ));
$userdata = array("userPassword" => $userpassword);
$result = ldap_mod_replace($ds, 'uid={user},'.LDAP_BASEDN, $userdata);
ldap_close($ds);
$result
returns true
i can even see the userpassword field change when i view the entry
but when i try to bind again using the new password it doesn't work, and the old password still works
running mac server 10.4