single line LDAP query that enumerates users from a group within a supergroup

后端 未结 2 956
天涯浪人
天涯浪人 2020-12-15 18:51

I have a scheme that looks like this:

  1. Users exist like UserA, UserB, UserC.
  2. Groups exist like OverGroup, SubGroup.
  3. OverGroup automaticall
相关标签:
2条回答
  • 2020-12-15 19:23

    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}))
    

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

    0 讨论(0)
  • 2020-12-15 19:23
    (&(objectClass=user)(memberof:1.2.840.113556.1.4.1941:=CN=MPV_BedPlacement,OU=Security Groups,OU=Groups,OU=CCHCS,DC=CCHCS,DC=LDAP))
    

    You have to add the full DN for the group and no curly braces.

    0 讨论(0)
提交回复
热议问题