If you look in the contrib directory of the perl-ldap distribution you'll find
my group example code.
The filter looks like:
member=uid=mewilcox,ou=people,dc=unt,dc=edu
or if you want wildcard
member=uid=mewilcox,*
or
member=*,ou=people,dc=unt,dc=edu
The tricky part to remember is that a member of the group could itself be
another group!
Mark
"GLASSON,Michael" wrote:
> Is there any trick to writing a filter to search for entries whose 'member'
> attribute has a particular value? That is, what does a filter to search for
> a dn in an attribute look like? This has got me stumped (sorry, I'm
> Australian) because I can retrieve records with '(member=*)', but not
> '(member=c*)'. Further, this last case returns an error, rather than no
> records.
>
> I have been trying to write a recursive walk in perl-ldap to give a tree
> structured view of distribution lists in Exchange. To do this, I wanted to
> find entries whose 'memberof' attribute contained the dn of the known root
> of lists. So my problems have started.
|