Search code examples
ldapopenldapldap-query

LDAP filter syntax not working using when using groups search filter


LDAP filter syntax is not working when I am using groups. I can filter to the OU level, but not when using groups nested inside that OU.

User Base DN looks like this:

cn=users,cn=accounts,dc=domain,dc=local

Search scope is "Search whole subtree below Base DN"

Group Base DN is:

cn=groups,cn=accounts,dc=domain,dc=local

My Search Filter is

(&(objectclass=groups)(cn=my_users))

I'm using OpenLDAP as the LDAP back-end. When executing the query I am getting "No groups found" when I know the group exists. I've researched and reviewed my syntax over and over again and still getting the same error. Any help?


Solution

  • Search Filter is wrong. Use instead:

    (&(objectclass=groupOfNames)(cn=my_users))