Admin Tools
userAccountControl decoder
See which flags a userAccountControl value holds, tick flags to build a value, and get the LDAP filter that finds the accounts — with Microsoft’s flag table and the flags that are not what they seem.
Value to flags
Decimal, such as 514, or hexadecimal with 0x, such as 0x202.
- Decimal
—- Hexadecimal
—
- Enter a value, pick a common one, or tick flags below.
LDAP filter for the ticked flags
—Tick one or more flags to build a filter.
Rule 803 matches when every bit of the value is set, 804 when any is; the value is always written in decimal. More in the LDAP filter syntax.
What you type stays in your browser: nothing is sent anywhere.
The flags
A userAccountControl value is the sum of its flags: 514 is ACCOUNTDISABLE (2) plus NORMAL_ACCOUNT (512), Microsoft’s own example of a disabled user. The Account options check boxes in Active Directory Users and Computers set some of them; some only the directory service can set or reset.
| Flag | Hex | Decimal | Meaning | AD Reports lists them in |
|---|---|---|---|---|
| SCRIPT | 0x0001 | 1 | The logon script runs.Microsoft’s protocol specification [MS-ADTS] lists this bit as unused in Active Directory. | — |
| ACCOUNTDISABLE | 0x0002 | 2 | The account is disabled. | |
| HOMEDIR_REQUIRED | 0x0008 | 8 | A home folder is required. | |
| LOCKOUT | 0x0010 | 16 | The account is locked out.Since Windows Server 2003 this state is kept in msDS-User-Account-Control-Computed, not in userAccountControl. | |
| PASSWD_NOTREQD | 0x0020 | 32 | No password is required: the password-length policy does not apply to the account. | |
| PASSWD_CANT_CHANGE | 0x0040 | 64 | The user cannot change the password.Not assigned through this attribute: it is a permission on the user object. | — |
| ENCRYPTED_TEXT_PWD_ALLOWED | 0x0080 | 128 | The password is stored with reversible encryption. | |
| TEMP_DUPLICATE_ACCOUNT | 0x0100 | 256 | An account for a user whose primary account is in another domain: access to this domain, not to domains that trust it.Microsoft’s protocol specification [MS-ADTS] lists this bit as unused in Active Directory. | — |
| NORMAL_ACCOUNT | 0x0200 | 512 | The default account type: a typical user. | — |
| INTERDOMAIN_TRUST_ACCOUNT | 0x0800 | 2048 | An account for a domain-to-domain trust.Trust accounts carry PASSWD_NOTREQD too: Microsoft’s default for a trust is 2080. | |
| WORKSTATION_TRUST_ACCOUNT | 0x1000 | 4096 | A computer account for a computer that is a member of this domain: workstations, member servers, and read-only domain controllers. | |
| SERVER_TRUST_ACCOUNT | 0x2000 | 8192 | A computer account for a domain controller; read-only domain controllers have WORKSTATION_TRUST_ACCOUNT instead.A domain controller’s default is 532480: this flag and TRUSTED_FOR_DELEGATION. | |
| DONT_EXPIRE_PASSWORD | 0x10000 | 65536 | The password never expires. | |
| MNS_LOGON_ACCOUNT | 0x20000 | 131072 | An MNS logon account.Microsoft’s protocol specification [MS-ADTS] lists this bit as unused in Active Directory. | |
| SMARTCARD_REQUIRED | 0x40000 | 262144 | The user must log on with a smart card. | |
| TRUSTED_FOR_DELEGATION | 0x80000 | 524288 | The account a service runs as is trusted for Kerberos delegation: the service can impersonate any client that uses it. | |
| NOT_DELEGATED | 0x100000 | 1048576 | The user’s security context is never delegated to a service, even one trusted for delegation. | |
| USE_DES_KEY_ONLY | 0x200000 | 2097152 | Kerberos: only DES encryption types are used for the account’s keys. | |
| DONT_REQ_PREAUTH | 0x400000 | 4194304 | Kerberos pre-authentication is not required to log on. | |
| PASSWORD_EXPIRED | 0x800000 | 8388608 | The password has expired: worked out by the system from pwdLastSet and the domain’s password policy.Since Windows Server 2003 this state is kept in msDS-User-Account-Control-Computed, not in userAccountControl. | |
| TRUSTED_TO_AUTH_FOR_DELEGATION | 0x1000000 | 16777216 | Enabled for delegation: a service running as the account can take on a client’s identity and authenticate as that user to other servers. Security-sensitive. | |
| NO_AUTH_DATA_REQUIRED | 0x2000000 | 33554432 | Kerberos: service tickets for the account are issued without a PAC (Privilege Attribute Certificate).From [MS-ADTS]; not in Microsoft’s KB flag table. | — |
| PARTIAL_SECRETS_ACCOUNT | 0x4000000 | 67108864 | A read-only domain controller (RODC). Removing it from an RODC compromises that server’s security.Set together with WORKSTATION_TRUST_ACCOUNT. | — |
Sources, Microsoft Learn: UserAccountControl property flags (KB 305144) · User-Account-Control attribute · [MS-ADTS] 2.2.16 userAccountControl Bits · [MS-ADTS] 6.1.1.3.2 Read-Only Domain Controller Object · ms-DS-User-Encrypted-Text-Password-Allowed (reversible encryption). The reports column links this site’s Report Library.
Flags that are not what they seem
- LOCKOUT (16) and PASSWORD_EXPIRED (8388608). In domains since Windows Server 2003, Microsoft moved these two states to
msDS-User-Account-Control-Computed, an attribute whose value includes bits that are worked out when it is read rather than stored. AuserAccountControlfilter on them will not reliably find locked-out or expired accounts; for lockouts, uselockoutTime(see the LDAP filter examples). - PASSWD_CANT_CHANGE (64). You cannot assign it by changing
userAccountControl: “user cannot change password” is a permission on the user object — the Change Password right denied to Everyone and to SELF. - Set by the directory. Microsoft notes that some values cannot be set on a user or computer object at all: only the directory service sets or resets them.
- SCRIPT, TEMP_DUPLICATE_ACCOUNT and MNS_LOGON_ACCOUNT. Microsoft’s KB table lists them; its protocol specification [MS-ADTS] marks these three bits as unused in Active Directory: they must be zero and are ignored.
- NO_AUTH_DATA_REQUIRED (33554432) is defined in [MS-ADTS] but not in the KB table.
- Defaults. Microsoft gives these: a typical user 512 (0x200), a workstation or member server 4096 (0x1000), a domain controller 532480 (0x82000), a trust 2080 (0x820). Trust accounts carry PASSWD_NOTREQD because trusts do not use the usual password policy.
- Decimal in filters. After
:=the value must be a decimal number — not hexadecimal such as0x202, and not a name such as ACCOUNTDISABLE. The builder above always writes decimal. - Other bits. A value with a bit that is no flag above — 0x4, 0x400, 0x4000, 0x8000 or anything from 0x8000000 up — is shown as “Not a flag”. Microsoft lists 0x8000000 (UF_USE_AES_KEYS) among the bits of
msDS-User-Account-Control-Computed.
Sources, Microsoft Learn: UserAccountControl property flags (KB 305144) · ms-DS-User-Account-Control-Computed attribute · Reading User Cannot Change Password (LDAP Provider) · [MS-ADTS] 2.2.16 userAccountControl Bits · Search Filter Syntax
In AD Reports
The decoder reads one value. These reports list every account in the domain by the same flags — the table above links one for each flag that has one:
- Disabled User Accounts: Account StatusUser accounts that have been disabled.
- Locked User Accounts: Account StatusAccounts locked out after failed logon attempts.
- Password Never Expires: Password StatusAccounts whose password never expires.
- Password Not Required: Password StatusAccounts that can have no password.
- No Kerberos Preauthentication: Account StatusThe accounts AS-REP roasting targets.
- Unconstrained Delegation Outside Domain Controllers: Security FindingsEnabled users and computers trusted for delegation to any service, writable domain controllers left out.
- Accounts That Do Not Require a Password: Security FindingsEnabled users, computers and managed service accounts with the flag; trust accounts left out.
- LDAP Filter Settings: GuideCheck Custom LDAP Filter in the Report Wizard and paste the filter built above.
Find these accounts in your domain
Download the free 14-day trial: the Account Status and Password Status reports list disabled, locked, never-expiring and delegation-enabled accounts.