0
votes

Hey guys, I tried searching online and mostly on here but most answers don't satisfy. I want to get all the users that have a certain group in their memberOf attribute, but can't seem to LDAP query them properly. The string I'm using for the filter is "(&(objectClass=user)(memberOf=cn=,ou=,dc=, dc=))" - which gets no results what so ever. If I remove the 'memberof' clause it finds all the users.

My first conclusion is that multi-valued attributes such as memberof cannot be simply queried like so. What is an alternative solution?

Thanks.

1
Are you sure the users are direct (non-nested) members of the group you're filtering? The filter (&(objectCategory=person)(objectClass=user)(memberOf=CN=GroupName,OU=A,DC=domain,DC=edu)) works as expected here.jscott

1 Answers

0
votes

Have you tried doing it one of these ways? This one looks particularly useful., if you don't have 3.5, then the following may be of more help?