Tivoli Directory Server - How to set pwdReset to false for a user through Java

744 Views Asked by At

I need to set the attribute pwdReset to false through Java. My code works for all the other attributes, but this attribute's value remains false even if I set it to false. I don't get any error while modifying the attribute either. (I know this is an operational attribute and should not be changed explicitly but I do not have a choice as its value doesn't change to false even after the password is changed after reset.) Following is the code -

BasicAttribute attr = new BasicAttribute("pwdReset","FALSE");
modsList.add(new ModificationItem(DirContext.REPLACE_ATTRIBUTE, attr));
ModificationItem [] modsArr = modsList.toArray(new ModificationItem[modsList.size()]);
ctx.modifyAttributes(username, modsArr);

I have even tried Integer.toString(0), false etc. as values for the attribute but none worked. Could anybody please help?

0

There are 0 best solutions below