Change resetted user password using LDAP API
Greetings,
I need some help on how to change a resetted user password programmatically.
I've a password policy that enforce the user to change his password when changed by an administrator (password resetted).
So, when the user login, the application alert him to change the password, showing a custom "change password" page.
When the user change his password, the application try to connect to ldap using logged user DN and passoword. All work perfectly, except that, when the application try to change user password, i got:
------
Error encountered when resolving user - DN = cn=xxx,cn=xxx,dc=xxx,dc=xxx [LDAP: error code 53 - Password Policy Error :9009: GSL_PWDMUSTCHANGE_EXCP :Your Password has been reset; You must change your password before performing other operations.
------
(DN is obfuscated)
I got the error on this line:
----- myuser.setProperties(ctx, modPropertySet);
-----
modPropertySet is configured to replace only the attribute "userpassword" with the new password, and myuser is a "oracle.ldap.util.User" object.
If i try to connect using an administrator account, all work perfectly, except that, modifying the password with the administrator, the user always get his password resetted...
Someone can help me?
THANK!
Luca De Petrillo.