Active Directory 中的哪些字段不仅是唯一的,而且是不可变的 (ADFS)
What Fields in Active Directory Are Not Only Unique, But Also Immutable (ADFS)
我一直在寻找一种在 Active Directory 中准确识别用户的方法。我发现这个 article 解释了哪些字段是唯一的。这是一个很好的起点,但没有确定哪些字段是不可变的。进一步的 google 查询导致 immutableId
上的 AzureAD 结果,这是我想要的,但对于常规 AD。我试图防止的情况是我使用 sAMAccountName
(这是唯一的)来识别用户,但是管理员出于某种原因(可能是为了统一)决定更改 sAMAccountName
并且我确定了同一个旧用户(现在有一个新 sAMAccountName
作为新用户。
文章中的一些竞争者:
- DN
- UPN
- sAMAccountName
- ObjectGUID
有什么我遗漏的吗?纯 AD(不是 AzureAD)中是否有 immutableId
等效项?
您可能想要的是 objectGUID
。正如 "GUID" 所暗示的那样,它是 "globally unique"。它不会改变,即使帐户移动到另一个域。
还有新账号objectSid
(SID = Security Identifier), which is what Windows permissions use (the SID is stored in the permissions). It is also globally unique, but part of the SID is the SID of the domain. So if the account is moved to another AD domain, a new SID is generated on that domain, and the old objectSid
is put in the sIDHistory
这里有一些额外的阅读:Security identifiers and globally unique identifiers
只要帐户被重命名或移动到新的 OU,distinguishedName
就会发生变化。
如您所述,userPrincipalName
和 sAMAccountName
也可以更改。
我一直在寻找一种在 Active Directory 中准确识别用户的方法。我发现这个 article 解释了哪些字段是唯一的。这是一个很好的起点,但没有确定哪些字段是不可变的。进一步的 google 查询导致 immutableId
上的 AzureAD 结果,这是我想要的,但对于常规 AD。我试图防止的情况是我使用 sAMAccountName
(这是唯一的)来识别用户,但是管理员出于某种原因(可能是为了统一)决定更改 sAMAccountName
并且我确定了同一个旧用户(现在有一个新 sAMAccountName
作为新用户。
文章中的一些竞争者:
- DN
- UPN
- sAMAccountName
- ObjectGUID
有什么我遗漏的吗?纯 AD(不是 AzureAD)中是否有 immutableId
等效项?
您可能想要的是 objectGUID
。正如 "GUID" 所暗示的那样,它是 "globally unique"。它不会改变,即使帐户移动到另一个域。
还有新账号objectSid
(SID = Security Identifier), which is what Windows permissions use (the SID is stored in the permissions). It is also globally unique, but part of the SID is the SID of the domain. So if the account is moved to another AD domain, a new SID is generated on that domain, and the old objectSid
is put in the sIDHistory
这里有一些额外的阅读:Security identifiers and globally unique identifiers
只要帐户被重命名或移动到新的 OU,distinguishedName
就会发生变化。
如您所述,userPrincipalName
和 sAMAccountName
也可以更改。