No announcement yet.

Query for users that are members of two groups

  • Filter
  • Time
  • Show
Clear All
new posts

  • Query for users that are members of two groups

    Long time Hyena user and big fan of this forum with a couple of questions around an LDAP query:

    I want a query to find out of any users exist that are a member of two groups, Domain Admins and GP - VPN Access US. I'm thinking that this query would work, but it doesn't return any results (when I know some exist):

    (&(objectClass=user)(objectCategory=person)(memb er Of=cn=Domain Admins,cn=Users,dc=Contoso,dc=com)(memberOf=cn=GP - VPN Access US,dc=Groups,dc=Contoso,dc=com))

    Is the issue the presence of spaces in the group? What would be the proper syntax?

    On a related note, are wildcards supported? This didn't fly either:
    (&(objectClass=user)(objectCategory=person)(memb er Of=cn=Domain Admins,cn=Users,dc=Contoso,dc=com)(memberOf=cn=GP* ,dc=Contoso,dc=com))

  • #2
    Good to hear from you Bill! This worked for me:

    (&(objectCategory=user)(objectClass=user)(memberOf =CN=Domain\20Admins,CN=Users,DC=support,DC=systemt ools,DC=com)(memberOf=CN=Schema\20Admins,CN=Users, DC=support,DC=systemtools,DC=com))

    Use \20 in place of the spaces.


    • #3
      In the near future we will also have a new feature coming that should help with this as well. We are adding a "matrix" view that will make it easier to see which users are members of which groups in Hyena's right-hand window. Basically, you'll have columns across the top with your groups listed, then all of your users down the left-hand side. For each group that a user is a member of, you'll see a X (or some symbol) indicating they are in that group. This will give you a quick indication which users are in certain groups, and in this case you could quickly identify any users that are members of both Domain Admins and VPN Access by seeing the X in both of the respective columns.