I am trying to unlock the AD account using UNBoundID, but i am unable to succeed on it. can anyone please help me on this.?
One of my try as below,
byte[] quotedPasswordBytes=null;
final String quotedPassword = '"' + flag + '"';
try {
quotedPasswordBytes = quotedPassword.getBytes("UTF-16LE");
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Modification mod=new Modification(ModificationType.REPLACE, "msDS-User-Account-Control-Computed",quotedPasswordBytes);
ModifyRequest modifyRequest= new ModifyRequest(userDn, mod);
/*ModifyRequest mr = new ModifyRequest(userDn,
[new Modification(ModificationType.REPLACE, "msDS-UserAccountDisabled", "TRUE".bytes)]);*/
connection.modify(modifyRequest);
FYI,
Thanks in advance,