using JNDI to get members of a group
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   GEORGE_THOMAS
Posted On:   Monday, May 19, 2003 02:26 PM

Hi All How do I search for members of a particular group in my LDAP directory?? I am doing it this way: Hashtable env = new Hashtable(11); env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory"); env.put(Context.PROVIDER_URL, "ldap://localhost:389/o=carreker.com"); // Create the initial directory context ctx = new InitialDirContext(env); BasicAttributes basicAttrs = new BasicAttributes("uniquemembers",null); String name= "cn=" + groupName + ", ou=Groups"; NamingEnumeration grpEnum = ctx.search(name,basicAttrs); This query doesnt return me anything. What am i doing wrong?? Any help is a   More>>

Hi All
How do I search for members of a particular group in my LDAP directory?? I am doing it this way:

Hashtable env = new Hashtable(11);
env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL, "ldap://localhost:389/o=carreker.com");

// Create the initial directory context
ctx = new InitialDirContext(env);
BasicAttributes basicAttrs = new BasicAttributes("uniquemembers",null);
String name= "cn=" + groupName + ", ou=Groups";
NamingEnumeration grpEnum = ctx.search(name,basicAttrs);


This query doesnt return me anything. What am i doing wrong??

Any help is appreciated.
Thanks in advance

   <<Less
About | Sitemap | Contact