Since a recent update in my LDAP server (using Directory Server v2.1-2428 on a Synology NAS running DSM 6, latest subversion) I cannot change a password (or a new user containing a password) using PHP.
Before the update, I used PHP ldap_add or ldap_mod with the userPassword attribute. However, now I get the error message
Warning: ldap_add(): Add: Constraint violation
In the end, the solution was to ask Synology over and over te help finding a solution. They changed the password policy back to version before the update to v2.1-2428, now it works again.
If there would be another solution available which is compatible with recent versions of OpenLDAP, sharing would be greatly appreciated.