Flags that control the behavior of the user account.
This attribute value can be zero or a combination of one or more of the following values.
Note You cannot assign the permission settings of PASSWD_CANT_CHANGE by directly modifying the UserAccountControl attribute. For more information and a code example that shows how to prevent a user from changing the password, see User Cannot Change Password.
Send comments about this topic to Microsoft
Build date: 7/7/2009
If you put this into your LDAP query string, you can check against single flag bits of this value:
(&(-other-ldap-query-items-)(userAccountControl:1.2.840.113556.1.4.803:=65536))
Convert the flag bit to be queried into its decimal value (e.g., ADS_UF_DONT_EXPIRE_PASSWD is 0x10000, which is 65536 in decimal). The expression evaluates TRUE if the flag is set. You can combine any flags by adding more expressions like that and can even test for "flag cleared" by putting (!...) around the expression (i.e. negation).