Getting WILL_NOT_PERFORM error when trying to enable user via LDAP
问题 I'm trying to create a new Active Directory user via ldap, but the user is disabled on creation. I am trying to set the userAccountControl attribute to 512, but I am getting an error WILL_NOT_PERFORM. I've read this is because the password isn't being set, but I can't tell why. Creating the user with the userPassword attribute set is working fine. Here is the code: // Create a container set of attributes Attributes container = new BasicAttributes(); // Assign the properties we need to set on