[Webinar] Streamline your web hosting managementRegister Today

x
• Status: Solved
• Priority: Medium
• Security: Public
• Views: 8706

# useraccountcontrol codes

Hi I'm running a script to extract the Computer object information from a AD domain. I'm also extracting the 'useraccountcontrol' attribute and I'm getting the following 4 values:

4096
4098
4128
532480

I found the article http://support.microsoft.com/default.aspx?scid=kb;en-us;305144 but it doesn't explain the concept fully. I know 4096 and 532480 is probably a value to indicate domain controller machines. But I donot understand 4098 and 4128. How can I find more information on what these and other codes denote?

Any help will be greatly appreciated.
Gaurang
0
gtrivedi
1 Solution

Commented:
This is a bitmap value, that means each bit represents one of the flags. To create this attribute, just add the values of the flags the account should have.
To find out what a given attribute means, continue to subtract the largest possible flag value until you reach zero (4098 - 4096 = 2, 2 - 2 = 0); the values you subtracted are the flags set.
Or convert the value to binary (using calc.exe), check where the 1s are, and compare with the binary equivalent of the flags.
Binary numeral system
http://en.wikipedia.org/wiki/Binary_arithmetic

4096 is a plain computer account.
4098 is 4096 + 2, so this would be a disabled computer account.
4128 is 4096 + 32, so this would be a computer account that doesn't require a password.
532480 is 524288 + 8192, so this would be a domain controller account that's trusted for delegation.
0

Solutions ArchitectCommented:
It's a bitmask.  So convert the number to binary so that would return:

10000010000000000000

So this would be two separate values (past into calculator and conver to hex):

10000000000000000000 which is 80000 hex or 0x80000 as per your the MS article equals TRUSTED_FOR_DELEGATION

and

00000010000000000000 which is 2000 or 0x2000 as per your MS article equals SERVER_TRUST_ACCOUNT

hope that helps
0

Author Commented:
Thanks oBDA and Pber.
I understand the concept now.
0

## Featured Post

Tackle projects and never again get stuck behind a technical roadblock.