Tips for finding Knowledge Articles

  • - Enter just a few key words related to your question or problem
  • - Add Key words to refine your search as necessary
  • - Do not use punctuation
  • - Search is not case sensitive
  • - Avoid non-descriptive filler words like "how", "the", "what", etc.
  • - If you do not find what you are looking for the first time,reduce the number of key words you enter and try searching again.
  • - Minimum supported Internet Explorer version is IE9
Home  >
article

KB-2802: How to unlock a user account in Active Directory with adedit

Centrify DirectControl ,  

12 April,16 at 11:44 AM

Applies to: DirectControl 4.4.4, 5.0.x and above

Question:

How to unlock a user account in Active Directory from UNIX using adedit?

Answer:

You can use the adedit command line interface utility:

1. Run the command.
    adedit

2. In the adedit prompt, bind ADEdit to one or more domains within a forest. Binding specifies the area within which all subsequent commands work.
    Syntax: bind [-gc] [-write] [-machine] [server@]domain [user [password]]

3. Then select the AD user object to be unlocked

    Syntax: select_object [-rootsde] [-attrs a1[,a2,...]] dn

4. Set the userAccountControl 'lockoutTime' attribute to 0.
    Syntax: set_object_field field value

5. Save the user object to AD

    Syntax: save_object

Example: To unlock the account for the user 'jsmith'
========================================
adedit

>bind acme.com

>select_object “CN=jsmith,OU+UNIX Users,OU=UNIX,DC=acme,DC=com”
>set_object_field lockoutTime 0
>save_object

For more details on the ADEdit commands and syntax, please either run ADEdit's  'help' command followed by a command or command abbreviation OR refer to the ADEdit Programmer’s Guide.

Still have questions? Click here to log a technical support case, or collaborate with your peers in Centrify's Online Community.