Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@rdev5
Created October 4, 2016 18:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rdev5/be47d7b25417abb606abccb7bd18e258 to your computer and use it in GitHub Desktop.
Save rdev5/be47d7b25417abb606abccb7bd18e258 to your computer and use it in GitHub Desktop.
/// <summary>
/// Defines the flags used for setting user properties in the directory.
/// </summary>
/// <remarks>
/// Source: https://msdn.microsoft.com/en-us/library/ms180913(v=vs.80).aspx
/// </remarks>
[SuppressMessage("ReSharper", "InconsistentNaming")]
public static class UserAccountFlags
{
public const int ADS_UF_SCRIPT = 1; // 0x1
public const int ADS_UF_ACCOUNTDISABLE = 2; // 0x2
public const int ADS_UF_HOMEDIR_REQUIRED = 8; // 0x8
public const int ADS_UF_LOCKOUT = 16; // 0x10
public const int ADS_UF_PASSWD_NOTREQD = 32; // 0x20
public const int ADS_UF_PASSWD_CANT_CHANGE = 64; // 0x40
public const int ADS_UF_ENCRYPTED_TEXT_PASSWORD_ALLOWED = 128; // 0x80
public const int ADS_UF_TEMP_DUPLICATE_ACCOUNT = 256; // 0x100
public const int ADS_UF_NORMAL_ACCOUNT = 512; // 0x200
public const int ADS_UF_INTERDOMAIN_TRUST_ACCOUNT = 2048; // 0x800
public const int ADS_UF_WORKSTATION_TRUST_ACCOUNT = 4096; // 0x1000
public const int ADS_UF_SERVER_TRUST_ACCOUNT = 8192; // 0x2000
public const int ADS_UF_DONT_EXPIRE_PASSWD = 65536; // 0x10000
public const int ADS_UF_MNS_LOGON_ACCOUNT = 131072; // 0x20000
public const int ADS_UF_SMARTCARD_REQUIRED = 262144; // 0x40000
public const int ADS_UF_TRUSTED_FOR_DELEGATION = 524288; // 0x80000
public const int ADS_UF_NOT_DELEGATED = 1048576; // 0x100000
public const int ADS_UF_USE_DES_KEY_ONLY = 2097152; // 0x200000
public const int ADS_UF_DONT_REQUIRE_PREAUTH = 4194304; // 0x400000
public const int ADS_UF_PASSWORD_EXPIRED = 8388608; // 0x800000
public const int ADS_UF_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION = 16777216; // 0x1000000
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment