Query ldap: ldapsearch for uniqueMember

How can I search for a unique member in the objectClassOfUniqueNames group in OpenLdap?

dn: cn=group,dc=example,dc=com
objectclass: groupOfUniqueNames
cn: group
uniquemember: uid=member1
uniquemember: uid=member2

I tried the following with no result:

ldapsearch -x -b dc = example, dc = com "(uniqueMember = uid = member1)"

Help me.

+4
source share
2 answers

The statement used in this filter may not complete the DN: "(uniqueMember=uid=member1)". uniqueMemberhas DN syntax, however the value used in the statement should be DN, for example (uniqueMember=uid=member1,ou=people,dc=example,dc=com).

see also

+3
source

Your request must be

"(& (Objectclass= groupOfUniqueNames) (uniqueMember = UID = member1, = , DC = , DC = ))"

- .

+1

All Articles