I want to unlock a locked active directory account using jndi. It is usually done using by changing the user account attribute as far I know. However I am unable to get the cor开发者_JS百科rect combination of its various options.
Set the lockoutTime attribute to 0 and you'll be good to go.
You can also use PowerShell:
Import-Module ActiveDirectory;
Unlock-ADAccount <Username>;
Replace with the actual username.
ChaiUser chai_user = chaiProvider.getEntryFactory().newChaiUser(userdn);
boolean islocked = chai_user.isLocked();
chai_user.unlockPassword();
精彩评论