1

我正在执行 LDAP 查询以获取用户的专有名称。DN 部分包含 Guid 和 SID,但 SID 部分是 HEX。

如何将此 HES 格式的 SID 转换为 SDDL 格式?

4

2 回答 2

1

您可以使用SecurityIdentifier 类

于 2011-07-08T05:02:51.617 回答
0

要扩展JPBlanc 的答案...

您可以为此创建一个小型辅助函数,如下所示:

private static String ResolveSID(Byte[] sidBytes)
{
    return (new System.Security.Principal.SecurityIdentifier(sidBytes, 0).ToString());
}
于 2015-03-25T18:22:02.507 回答