changePassword is for users to change their own password per pw policies.
updateUser  (with new password set on password) or resetUser  (to force user to 
change password on next login) are probably what you are looking for.
Shawn
-------- Original message --------From: Ramandeep Singh Nanda 
<[email protected]> Date: 12/16/16  1:00 PM  (GMT-06:00) To: 
[email protected] Subject: Regarding changing user password 
[rc=modifications require authentication] 
Hi,

As far as I remember admin users could change the password without
authentication.

AdminMgr mgr = createAndGetAdminMgr();
User user = new User();
try {
  user.setUserId(userId);
  user.setPassword(oldPassword.toCharArray());
  mgr.changePassword(user, newPassword.toCharArray());

}

Now, I am getting the following exception.

*Unable to change the password
org.apache.directory.fortress.core.model.User.changePassword user
[[email protected] <[email protected]>]  caught LDAPException rc=modifications require
authentication*

String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
AdminMgr mgr = null;
try {
  mgr = AdminMgrFactory.createInstance(GlobalIds.HOME);
}




-- 
Regards,
Ramandeep Singh
[email protected]

Reply via email to