1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Rep Power

    LDAP group filter

    Hi all,
    In my organization we use nested groups.
    For a particular usage, we have a group (let’s assume that the group name “kuku”), and the names of all the nested groups under it contains “kuku” as well.
    We may assume that no other group in the LDAP has “kuku” in the name.
    I need to create a filter which will return all the users which belong to one of the “kuku”s group.
    Obviously, using this filter will bring only the head kukus
    (&(&(objectclass=user)(objectclass=person))(memberOf=CN=kuku,cn=…rest of the group DN…))
    How can I use wild card to fetch all users which belong to any kuku?
    For example:
  2. #2
  3. Psycho Canadian
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Jan 2001
    Rep Power
    The memberOf attribute needs to be indexed, then you can use *


    I don't think the CN= should be there.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2009
    Charlotte, NC
    Rep Power
    the uniquemembership in the parent group will contain the CN of each of the child group or if a single child is nested and then another child nested in child1 and so on. First you get the members from group1 and grep the KuKu groups from it then for each of them you get their members and grep again for KuKu and so on, then concatenate the uses into a single list and return them. For the Sun DS group nesting is supported to 5 levels, so if your keeping to standards you code need only look 5 levels deep for nested groups.

IMN logo majestic logo threadwatch logo seochat tools logo