Novell is now a part of Micro Focus

Using an LDAP Search to Populate Dynamic Groups

Novell Cool Solutions: Tip

Digg This - Slashdot This

Posted: 25 Jun 2002

If you're looking for a way to do an LDAP search (for a dynamic group) based on an attribute of a related object, here's how:

For example
Let's say you have these users and groups:

dn: cn=john,o=novell
objectclass: inetorgperson

dn: cn=peter,o=novell
objectclass: inetorgperson

dn: cn=mary,o=novell
objectclass: inetorgperson

dn: cn=group1,o=novell
objectclass: group
member: cn=john,o=novell
member: cn=peter,o=novell
description: english students

dn: cn=group2,o=novell
objectclass: group
member: cn=mary,o=novell
description: english teachers

And you want dynamic groups containing all the users that belong to...
- a group whose description contains the word 'students'
- a group whose description contains the word 'english'

Here's the syntax:

  1. memberQueryUrl=ldap:///O=novell??sub?(&(objectclass=GroupOfNames)(|(description=*students*)(description=*english*)))
    this one delivers all groups containing EITHER "students" OR "english"

  2. memberQueryUrl=ldap:///O=novell??sub?(&(objectclass=GroupOfNames)(description=*students*)(description=*english*))
    this one delivers all groups containing english students

Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions.

© Copyright Micro Focus or one of its affiliates