title: How to fix the user account control attribute to 512 in Ldap
body: <p>Using Java code I am trying to crate user in AD LDAP but I am not able to set the <code>userAccountControl</code> status to 512 though I am trying to pass the status as 512 through my code but the user is created with different <code>userAccountControl</code> status as 544.</p>
  
  <p>And when the user is created I am not able to login with his id (DN) and password into LDAP.</p>
  
  <p>I am using the code :</p>
  
  <pre><code>attributes.add(new LDAPAttribute("userAccountControl", "512"));
  attributes.add(new LDAPAttribute("userPassword", "Password@1"));
  </code></pre>
  
  <p>Is there any other way I can set the <code>userAccountControl</code> to 512?</p>