[Date Prev][Date Next] [Chronological] [Thread] [Top]

Q: search filter to determine if a uid is in a group?



I have a simple schema with two groups and some users:

dc=com
   dc=company
        ou=people
             cn=web_users            (a posixGroup)
             cn=ftp_users              (a posixGroup)
             uid=emerth                 (a posixAccount)
             uid=...                        (more posixAccounts)

I would like to write a search filter for pureFTPd and one for mod_ldap (apache) that
can tell if (1) a user has a posixAccount, and (2) if that user is a member of one of the
groups.


I cannot find or derive syntax for a compound filter that, given a uid - say 'emerth', will
return a non-empty result when 'emerth' exists as a posixAcount and is also a member of
a specified group.


I have been trying to turn these two filters into a compound filter with no success:

  (&(objectClass=posixAccount)(uid=emerth))
  (&(objectClass=posixGroup)(cn=web_users)(memberUid=emerth))

Is there a different way to determine if a name is in a posixGroup than this kind of
filter?



Could anyone help or point me at a good tutorial on writing filters and/or search
techniques?


T.I.A.!

Eric

_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail