单行 LDAP 查询,枚举来自超组内的组的用户

编程入门 行业动态 更新时间:2024-10-24 18:29:14
本文介绍了单行 LDAP 查询,枚举来自超组内的组的用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个如下所示的方案:

I have a scheme that looks like this:

  • 用户存在,如 UserA、UserB、UserC.
  • 存在诸如 OverGroup、SubGroup 之类的组.
  • OverGroup 会自动将新用户(如 UserA、UserB 等)添加到其成员资格中.
  • 我自己创建的子组.我已将 OverGroup 设置为 SubGroup 的成员.
  • 我希望能够单行查询 SubGroup 而不是检索 OverGroup,即:

    I want to be able to one-line query SubGroup and retrieve not OverGroup, i.e.:

    Values: CN=OverGroup,OU=Groups,DC=example,DC=com

    但 OverGroup 中实际用户(用户 A、B、C)的完整枚举,即:

    but the full enumeration of the actual Users (User A, B, C) within OverGroup, i.e.:

    Values: CN=UserA,OU=OtherOU,DC=example,DC=com CN=UserB,OU=OtherOU,DC=example,DC=com CN=UserC,OU=OtherOU,DC=example,DC=com

    是否有可以检索此内容的单行 LDAP 过滤器?(它将被放入 Request Tracker 实例中的 ExternalAuth 配置ldap"部分.很确定我只能通过 ExternalAuth 模块可以理解的一个查询来做到这一点.)

    Is there a one-liner LDAP filter that could retrieve this? (It will be put into the ExternalAuth configuration 'ldap' section in a Request Tracker instance. Pretty sure I can only do this with one query the ExternalAuth module can understand.)

    我尝试的所有方法都不起作用,并且根据我的阅读,似乎不可能通过任何单行查询枚举属于另一个组的组中的用户列表.想法?

    Everything I try does not work, and from my reading, it does not seem possible to enumerate a list of users within a group that is a member of another group with any one-line query. Thoughts?

    推荐答案

    Active Directory 有一个特殊的搜索过滤器选项,允许它过滤链接对象,如嵌套组.该功能在此处进行了描述.

    Active Directory has a special search filter option that allows it to filter through chained objects, like nested groups. The capability is described here.

    以下是如何检索组中所有用户的示例,包括嵌套组:

    Here is an example of how to retrieve all users in a group, including nested groups:

    (&(objectClass=user)(memberof:1.2.840.113556.1.4.1941:={0}))

    其中 {0} 是父组的 DN.

    where {0} is the DN of the parent group.

    更多推荐

    单行 LDAP 查询,枚举来自超组内的组的用户

    本文发布于:2023-11-12 12:43:46,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1581525.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:用户   LDAP   超组内

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!