我正在嘗試使用UNBoundID解鎖AD帳戶,但我無法成功。任何人都可以請幫助我。使用UNBoundID SDK解鎖用戶帳戶
我的一個嘗試下面的,
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);
僅供參考,
由於提前,