Search code examples
active-directoryadlds

Setting an AD user active by default (on creation)


I wrote some code (Java and LDAP) to create a user in the Active directory.
Is it possible to set a user active by default (when he is created)
in the active directory when I create him or do I have to modify the user?
(the user will always have a pass when created)


Solution

  • As long as the user has a password, you can enable the account at creation by setting userAccountControl to 512. It's possible you might need to do this in a second LDAP call depending on how your creation/password set code works.