|
question requête LDAP à partir de rootDSE: msg#00060java.french.general
Bonjour, Est-il possible d'effectuer une requête LDAP au niveau du rootDSE de l'annuaire? Je n'y arrive pas. L'utilisateur qui se trouve dans o=myOrg n'est alors par trouvé. Je fais donc les recherches à partir de o=myOrg. Seulement voilà, je dois maintenant rechercher les utilisateurs dans plusieurs organisations situées juste sous le rootDSE. Je suppose que je m'y prends mal alors si quelqu'un a une piste. Pour info un extrait du code que j'utilise: --------------------- Properties props = new Properties(); props.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); props.put(Context.SECURITY_AUTHENTICATION, "simple"); //use simple authentication mechanism props.put(Context.SECURITY_CREDENTIALS, password); props.put(Context.SECURITY_PRINCIPAL, DN); props.put(Context.PROVIDER_URL, ldapHost); DirContext ctx = new InitialDirContext(props); // Create the default search controls SearchControls ctls = new SearchControls(); // Specify the search filter to match String filter = "(|(uid=" + name + ")(cn=" + name + "))"; // Search for objects that have those matching attributes NamingEnumeration answer = ctx.search("o=myOrg", filter, ctls); ---------------- Patrice Accédez au courrier électronique de La Poste : www.laposte.net ; 3615 LAPOSTENET (0,34?/mn) ; tél : 08 92 68 13 50 (0,34?/mn)
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: RE : parsing de document XML, Emmanuel Feller |
|---|---|
| Next by Date: | Re:question requête LDAP à partir de rootDSE, Patrice Godard |
| Previous by Thread: | RE : parsing de document XML, Cyril Scelles |
| Next by Thread: | Re:question requête LDAP à partir de rootDSE, Patrice Godard |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |