I am trying to get all the groups that a certain user is a member of.
I have the following structures in ldap:
o=myOrganization ou=unit1
member=cn=ann is not enough. You have to use ann's full DN, probably something like this:
member=cn=ann
member=cn=ann,ou=users,dc=company,dc=com