Ldap – Can not find entry in ldap with ldapsearch

ldapopenldap

I have the following ldap entries for a group and a user and I want to test the memberof overlay.

dn: cn=authentication,dc=groups, dc=groupTestMemberOf, dc=application, dc=company, dc=de
description: Authentication Gruppe
objectClass: customGroup
member: uid=userTestMemberOf,dc=users,dc=company,dc=de
cn: authentication

dn: uid=userTestMemberOf,dc=users,dc=company,dc=de
cn: test userTestMemberOf
givenName: test
sn: userTestMemberOf
uid: userTestMemberOf
mail: userTestMemberOf@company.com
objectClass: top
objectClass: customUser
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: person
employeeType: person

Now I want to test it with the ldapsearch command, but I always get the result 32 No such object.

My command is

ldapsearch -v -x -b uid=userTestMemberOf,dc=users,dc=company,dc=de dn memberof

What am I missing?

Best Answer

I forgot the username and password in the ldapsearch...

The correct command has to be

ldapsearch -v -x -D *DNofUSER* -w *PW* -b "dc=users,dc=company,dc=de" "(uid=userTestMemberOf)" dn memberof

Related Topic