Enabling an Active Directory account using JNDI

北城以北 提交于 2020-01-03 04:49:11

问题


I have successfully created a disabled user in Active Directory via JNDI, but I am not sure how to enable it. Am I supposed to manipulate the userAccountControl attribute directly? Thanks.


回答1:


You are right.

Here are some values and the explanation how to use them :

UF_TEMP_DUPLICATE_ACCOUNT       0x0100
UF_NORMAL_ACCOUNT               0x0200
UF_INTERDOMAIN_TRUST_ACCOUNT     0x0800
UF_WORKSTATION_TRUST_ACCOUNT     0x1000
UF_SERVER_TRUST_ACCOUNT       0x2000
UF_DONT_EXPIRE_PASSWD           0x10000
UF_SCRIPT                       0x0001
UF_ACCOUNTDISABLE               0x0002
UF_HOMEDIR_REQUIRED           0x0008
UF_LOCKOUT                     0x0010
UF_PASSWD_NOTREQD               0x0020
UF_PASSWD_CANT_CHANGE           0x0040

Exhaustive list of values here.

For example

userAccountControl = 544

544 = 0x220 = UF_NORMAL_ACCOUNT | UF_PASSWD_NOTREQD



来源:https://stackoverflow.com/questions/5623733/enabling-an-active-directory-account-using-jndi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!