title: How can I enable or disable an AD user account with an LDAP request?
body: <p>So far I was able to find users in LDAP but I don't know how can I enable or disable them.</p>
  
  <p>As a second question, if my account has Domain Admin rights, I will be able to enable or disable account from LDAP or not?</p>
  
  <p>Note: This is about a Microsoft Active Directory running on Windows 2003.</p>
  
  <p>I know that I can check <strong>active uses</strong> with:</p>
  
  <pre><code>(!(useraccountcontrol:1.2.840.113556.1.4.803:=2))
  </code></pre>
  
  <p>Disabled useds:</p>
  
  <pre><code>(useraccountcontrol:1.2.840.113556.1.4.803:=2)
  </code></pre>
  
  <p>The question is how do I set the attribute in such way that it will not loose other binary flags inside.</p>