0

I'm trying to make a ldap query which I can run in active directory tool, so I can have an overview of all users with their groups.

What do I need to add to this script to see the groups of these users ?

&(objectCategory=person)(objectClass=user) (givenName=)(sn=))

Thanks,

3

This is not a script, this is a LDAP filter which means :

(&(objectCategory=person)(objectClass=user)(givenName=*)(sn=*))

Retrieve the entries which are of the type person AND user AND which possess these attributes populated : givenName AND sn

If you want to retrieve the groups which these users are member of, configure on the tool that you want to also retrieve the attribute memberOf from the users entries filtered.

As stated in the Subject of the question, if you want to know the members of the group MyGroupName, retrieve the member attribute of this group filtered by a LDAP filter, for example, such as :

(&(objectClass=groupOfUniqueNames)(cn=MyGroupName))

  • How do I combine the two requirements than ? :s – Joep Jun 14 '17 at 10:02
  • 1
    What do you mean by combine? You retrieve either the groups with their members OR the users with their groups. – Esteban Jun 14 '17 at 10:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.