To retrieve attributes from member entries, search all users whose
isMemberOf
attribute contains the group DN, returning the
attributes desired.
To retrieve additional information about the members, such as attributes from member entries, issue a separate search for each member to retrieve the user entry and the desired attributes.
This table contains the search criteria to retrieve the list of all members for
the group cn=Test Group,ou=Groups,dc=example,dc=com
.
Base DN |
|
Scope |
|
Filter |
|
Requested attributes |
|
$ bin/ldapsearch --baseDN "cn=Test Group,ou=Groups,dc=example,dc=com" \
--searchScope base "(objectclass=*)" uniqueMember
The returned entry includes the DNs of all users that are members of that group.