Tuesday, March 27, 2012

entry of 66048 (0x10200) when it should be 512 (0x200). eh?

So someone says:

"Oh so sorry, we've fascist controls on our AD-integrated site and you have: userAccountControl entry of 66048 (0x10200), when it should be 512 (0x200). No logon for you."

What does that mean, really?
Well. What it means is that according to UAC you've got the DONT_EXPIRE_PASSWORD property set. It incidentally has the hex and decimal settings of:
0x10000 and 65536 If we add those up, mister normal user, NORMAL_ACCOUNT (0x0200 512), we get 0x10200. That no expiring password... that's not expected.

Of course...

Here's something from Microsoft:

When you open the properties for a user account, click the Account tab, and then either select or clear the check boxes in the Account options dialog box, numerical values are assigned to the UserAccountControl attribute. The value that is assigned to the attribute tells Windows which options have been enabled.

To view user accounts, click Start, point to Programs, point to Administrative Tools, and then click Active Directory Users and Computers.

You can view and edit these attributes by using either the Ldp.exe tool or the Adsiedit.msc snap-in.

The following table lists possible flags that you can assign. You cannot set some of the values on a user or computer object because these values can be set or reset only by the directory service. Note that Ldp.exe shows the values in hexadecimal. Adsiedit.msc displays the values in decimal. The flags are cumulative. To disable a user's account, set the UserAccountControl attribute to 0x0202 (0x002 + 0x0200). In decimal, this is 514 (2 + 512).

Note You can directly edit Active Directory in both Ldp.exe and Adsiedit.msc. Only experienced administrators should use these tools to edit Active Directory. Both tools are available after you install the Support tools from your original Windows installation media.
Property flag                   hexadecimal decimal
SCRIPT                          0x0001          1
ACCOUNTDISABLE                  0x0002          2
HOMEDIR_REQUIRED                0x0008          8
LOCKOUT                         0x0010          16
PASSWD_NOTREQD                  0x0020          32
PASSWD_CANT_CHANGE              MS says this can't be done programmatically.
ENCRYPTED_TEXT_PWD_ALLOWED      0x0080          128
TEMP_DUPLICATE_ACCOUNT          0x0100          256
NORMAL_ACCOUNT                  0x0200          512
INTERDOMAIN_TRUST_ACCOUNT       0x0800          2048
WORKSTATION_TRUST_ACCOUNT       0x1000          4096
SERVER_TRUST_ACCOUNT            0x2000          8192
DONT_EXPIRE_PASSWORD            0x10000         65536
MNS_LOGON_ACCOUNT               0x20000         131072
SMARTCARD_REQUIRED              0x40000         262144
TRUSTED_FOR_DELEGATION          0x80000         524288
NOT_DELEGATED                   0x100000        1048576
USE_DES_KEY_ONLY                0x200000        2097152
DONT_REQ_PREAUTH                0x400000        4194304
PASSWORD_EXPIRED                0x800000        8388608
TRUSTED_TO_AUTH_FOR_DELEGATION  0x1000000       16777216
PARTIAL_SECRETS_ACCOUNT         0x04000000      67108864

1 comment:

thulannguyen said...

Thanks for sharing, nice post! Post really provice useful information!

An Thái Sơn chia sẻ trẻ sơ sinh nằm nôi điện có tốt không hay võng điện có tốt không và giải đáp cục điện đưa võng giá bao nhiêu cũng như mua máy đưa võng ở tphcm địa chỉ ở đâu uy tín.