I'm running into issues setting the user's password via PHP's ldap library. Specifically, the ldap_mod_replace function.

I'm using userPassword as the attribute.

The php code looks something like:

PHP Code:
 ldap_mod_replace $server_connnection $user_entry_dn , ['userPassword' => 'password'] ); 
PHP Code:
ldap_error($server_connection); 
returns "Constraint violation".

All the other attributes can be modified just fine. The bind user is an admin, so permissions should not be an issue.

Does anyone have a solution to this? Or at least know why PHP can't make the change?

Thanks!