wood burning stoves*
The moose likes Security and the fly likes How to get entries in ldap? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Security
Bookmark "How to get entries in ldap?" Watch "How to get entries in ldap?" New topic
Author

How to get entries in ldap?

Paulo Aquino
Ranch Hand

Joined: Apr 29, 2002
Posts: 200
Hi! LDAP newbie here, so please be kind to me. Anyway, here is the directory structure

ou = People
ou = Services
ou = Extranet
-------ou = Groups
-------ou = People
--------------uid=pinolo
--------------uid=pizarro
--------------uid=racero
--------------uid=tirano

under the uid entry, these are some attributes:
uid
sn
givenName
mail
cn

What I need to do is to loop through all of the uid entries (pinolo, pizarro etc)....printing each uid entries then printing all attributes found under each entry. Can anyone help me with a code snippet?


Be Afraid...Be very Afraid...
Paulo Aquino
Ranch Hand

Joined: Apr 29, 2002
Posts: 200
anyone?
Paulo Aquino
Ranch Hand

Joined: Apr 29, 2002
Posts: 200
Im really stuck, hope somebody will respond.
Vishwa Kumba
Ranch Hand

Joined: Aug 27, 2003
Posts: 1066
Refer these links:

http://java.sun.com/products/jndi/tutorial/ldap/security/ldap.html

http://www.ldapguru.com/modules/wfsection/index.php?category=7

http://java.sun.com/products/jndi/tutorial/basics/directory/basicsearch.html
Vishwa Kumba
Ranch Hand

Joined: Aug 27, 2003
Posts: 1066
Sometime back, the foll. code used to work for me with Weblogic 8.1 Embedded LDAP database, but I guess it is likely to work with other LDAP servers also.

Which LDAP server are you using?


[ June 13, 2005: Message edited by: Vishwa Kumba ]
Vishwa Kumba
Ranch Hand

Joined: Aug 27, 2003
Posts: 1066
http://www.coderanch.com/t/133108/Security/LDAP-sample-program
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to get entries in ldap?