Workflow Tools Control Yard

Home / Active Directory

userAccountControl decoder

Every user and computer account in Active Directory has a userAccountControl value: the flags of the account, added up into one number. Enter the number to see its flags, or tick flags in the table to build a value.

Common values

Most accounts have one of these values. Microsoft gives 512 for a typical user, 4096 for a workstation or member server, 532480 for a domain controller and 2080 for a trust. Select a value to decode it above.

DecimalHexFlagsWhat it usually is
5120x200NORMAL_ACCOUNTAn enabled user. Microsoft gives 512 as the value of a typical user.
5140x202ACCOUNTDISABLE + NORMAL_ACCOUNTA disabled user.
5440x220PASSWD_NOTREQD + NORMAL_ACCOUNTAn enabled user that may have an empty password.
5460x222ACCOUNTDISABLE + PASSWD_NOTREQD + NORMAL_ACCOUNTA disabled user that may have an empty password.
660480x10200NORMAL_ACCOUNT + DONT_EXPIRE_PASSWORDAn enabled user whose password never expires, often a service account.
660500x10202ACCOUNTDISABLE + NORMAL_ACCOUNT + DONT_EXPIRE_PASSWORDA disabled user whose password never expires.
660800x10220PASSWD_NOTREQD + NORMAL_ACCOUNT + DONT_EXPIRE_PASSWORDAn enabled user whose password never expires and may be empty.
660820x10222ACCOUNTDISABLE + PASSWD_NOTREQD + NORMAL_ACCOUNT + DONT_EXPIRE_PASSWORDA disabled user whose password never expires and may be empty.
2626560x40200NORMAL_ACCOUNT + SMARTCARD_REQUIREDA user who must log on with a smart card.
41948160x400200NORMAL_ACCOUNT + DONT_REQ_PREAUTHA user without Kerberos pre-authentication, open to AS-REP roasting.
5903360x90200NORMAL_ACCOUNT + DONT_EXPIRE_PASSWORD + TRUSTED_FOR_DELEGATIONA user trusted for unconstrained delegation whose password never expires.
83891200x800200NORMAL_ACCOUNT + PASSWORD_EXPIREDA user whose password has expired, as msDS-User-Account-Control-Computed shows it.
40960x1000WORKSTATION_TRUST_ACCOUNTA workstation or member server. Microsoft gives 4096 for both.
40980x1002ACCOUNTDISABLE + WORKSTATION_TRUST_ACCOUNTA disabled computer account.
41280x1020PASSWD_NOTREQD + WORKSTATION_TRUST_ACCOUNTA computer account that may have an empty password. Computer accounts created in advance in Active Directory Users and Computers start with this value.
5324800x82000SERVER_TRUST_ACCOUNT + TRUSTED_FOR_DELEGATIONA domain controller. Microsoft gives 532480 as the domain controller value.
838901760x5001000WORKSTATION_TRUST_ACCOUNT + TRUSTED_TO_AUTH_FOR_DELEGATION + PARTIAL_SECRETS_ACCOUNTA read-only domain controller (RODC).
20800x820PASSWD_NOTREQD + INTERDOMAIN_TRUST_ACCOUNTA trust account. Microsoft gives 2080 for trusts: PASSWD_NOTREQD is normal here, because trust passwords are kept elsewhere.

All flags

Tick a flag to add it to the value above. Two of the flags, LOCKOUT and PASSWORD_EXPIRED, have not been kept in userAccountControl since Windows Server 2003: Windows works them out each time and shows them in msDS-User-Account-Control-Computed. PASSWD_CANT_CHANGE is not kept here either, because User cannot change password is a permission on the account.

TickFlagHexDecimalWhat it means
0x000000011The logon script runs.
0x000000022The account is disabled: nobody can log on with it.
0x000000088A home folder is required.
0x0000001016The account is locked out. Windows does not keep this flag up to date in userAccountControl: read msDS-User-Account-Control-Computed or lockoutTime instead.
0x0000002032No password is required: the password length policy does not apply, so the password can be empty.
0x0000004064The user cannot change the password. Windows does not keep this here: the option is a permission on the account, and setting the bit has no effect.
0x00000080128Store password using reversible encryption: the password is kept in a form that can be turned back into clear text.
0x00000100256An account for a user whose main account is in another domain.
0x00000200512A typical user account.
0x000008002048The account of a trust with another domain.
0x000010004096The computer account of a workstation or member server of this domain.
0x000020008192The computer account of a domain controller of this domain.
0x0001000065536The password never expires.
0x00020000131072An MNS logon account.
0x00040000262144The user must log on with a smart card.
0x00080000524288Trusted for delegation to any service (unconstrained delegation): its tickets carry the OK as Delegate flag. Normal on domain controllers.
0x001000001048576Account is sensitive and cannot be delegated: its tickets are not forwardable, so no service can act as this account.
0x002000002097152Kerberos uses only DES keys for this account.
0x004000004194304Kerberos pre-authentication is not required.
0x008000008388608The password is older than the maximum password age. Not kept here: Windows shows it in msDS-User-Account-Control-Computed.
0x0100000016777216Trusted to authenticate for delegation: a service running as this account gets forwardable tickets for users who did not log on with Kerberos (protocol transition). Normal on read-only domain controllers.
0x0200000033554432Service tickets for this account carry no PAC, the part that lists the user's groups.
0x0400000067108864The computer account of a read-only domain controller (RODC). WORKSTATION_TRUST_ACCOUNT is always set with it.
0x08000000134217728Defined in lmaccess.h, but Windows clients and servers ignore it.

Find and change accounts with PowerShell

Get-ADUser jdoe -Properties userAccountControl, msDS-User-Account-Control-Computed
Get-ADUser -LDAPFilter "(userAccountControl:1.2.840.113556.1.4.803:=2)"
Get-ADUser -LDAPFilter "(userAccountControl:1.2.840.113556.1.4.803:=4194304)"
Get-ADComputer -LDAPFilter "(userAccountControl:1.2.840.113556.1.4.803:=524288)"
Set-ADAccountControl jdoe -PasswordNeverExpires $false
Disable-ADAccount jdoe

The second line finds disabled users, the third users without Kerberos pre-authentication, the fourth computers trusted for unconstrained delegation. 1.2.840.113556.1.4.803 is the LDAP rule for a bitwise AND: an account matches when it has every bit of the number. 1.2.840.113556.1.4.804 is the bitwise OR: an account matches when it has any of them.

To change a flag, use a cmdlet that sets one option, such as Set-ADAccountControl with -PasswordNeverExpires, -PasswordNotRequired, -DoesNotRequirePreAuth, -TrustedForDelegation or -AccountNotDelegated, rather than writing the whole number: a number typed by hand can drop a flag the account needs.

Sources

The flags and their values are from Microsoft's documentation: the article Use the UserAccountControl flags to manipulate user account properties, the User-Account-Control and ms-DS-User-Account-Control-Computed attribute pages, section 2.2.16 of the Active Directory Technical Specification [MS-ADTS], and the header file lmaccess.h. Microsoft publishes the article and the attribute pages under the Creative Commons Attribution 4.0 International licence. The descriptions here are this site's own wording.

More Active Directory tools