I guess I wasn't clear. Say user with DN, uid=abc,ou=People,dc=sample,dc=com, belongs to two groups with DNs, cn=group1,ou=Roles,dc=sample,dc=com and cn=group2,ou=Groups,dc=sample,dc=com. Both groups have objectClass, groupOfUniqueNames. Knowing the group's RDN, "Roles" and the user's DN, I would like to write a filter that returns group1 (which is under "Roles", but not group2 (which is under "Groups").
Gang ________________________________ From: [email protected] [[email protected]] on behalf of Kiran Ayyagari [[email protected]] Sent: Tuesday, January 29, 2013 12:50 PM To: [email protected] Subject: Re: Query for user's groups On Wed, Jan 30, 2013 at 12:15 AM, Yang, Gang CTR (US) < [email protected]> wrote: > Hi, > > > > I've been trying to write an LDAP filter that returns the group/role > (knowing only the the group's RDN, say "Roles") a particular user (knowning > the user's DN, say "uid=abc,ou=Peole,dc=sample,dc=com") belongs to and of > course failed. I was able to return all groups the user belongs to by using > the following filter: > > > > > (&(objectClass=groupOfUniqueNames)(uniqueMember=uid=abc,ou=People,dc-sample,dc=com)) > > > > But how do I qualify the group with the paren's RDN, "Roles"? Any help is > greatly appreciated. > > not sure I understand your question completely are you trying to search for the roles under a DN like ou=Roles,dc=sample,dc=com? > > > Gang > -- Kiran Ayyagari http://keydap.com<http://keydap.com/>
