LDAP 嵌套组成员资格
是否可以创建一个 LDAP 查询来返回(或检查)嵌套组中的用户?例如,UserA 是GroupA 的成员,GroupA 是GroupB 的成员。我想要对 GroupB 进行查询以返回 UserA 是成员。仅限 LDAP。服务器是活动目录。
Is it possible to create an LDAP query which will return (or check for) users in a nested group? e.g. UserA is a member of GroupA, and GroupA is a member of GroupB. I want a query on GroupB to return that UserA is a member. LDAP only. The server is Active Directory.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
是,使用 LDAP_MATCHING_RULE_IN_CHAIN 匹配规则 (OID 1.2.840.113556.1.4.1941)。例如:
请参阅 http://msdn.microsoft.com /en-us/library/aa746475%28VS.85%29.aspx
Yes, using the LDAP_MATCHING_RULE_IN_CHAIN matching rule (OID 1.2.840.113556.1.4.1941). For example:
see http://msdn.microsoft.com/en-us/library/aa746475%28VS.85%29.aspx
在我的例子中使用
memberOf:1.2.840.113556.1.4.1941:=
时,您必须使用组的完整可分辨名称CN=MyGroup,OU=User,OU=Groups,OU= Security,DC=domain,DC=com
是完整的专有名称,您可以通过运行以下代码并放入此过滤器来获取组的专有名称
(&(objectClass=group)(name=MyGroup))
You must use the full distinguished name of your group when using
memberOf:1.2.840.113556.1.4.1941:=
in my caseCN=MyGroup,OU=User,OU=Groups,OU=Security,DC=domain,DC=com
was the whole distinguished nameyou can get the distinguished name of you group by running the following code and putting in this filter
(&(objectClass=group)(name=MyGroup))
根据您的问题,查询应该是
{0}
是嵌套组,它应该是可分辨名称{1}
是用户 <您想要的strong>sAMAccountName(您可以在(sAMAccountName={1})
中使用除sAMAccountName之外的任何其他用户属性)然后,如果用户是会员,您将获得用于响应的用户详细信息嵌套组的
Per your question, the query should be
{0}
is the nested group, it should be a Distinguished name{1}
is the user sAMAccountName you want (you could use any other user property than sAMAccountName within(sAMAccountName={1})
)Then you will get the user detail for response if the user is the member of nested group