Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to retrive attribute from ldap structure

 
Rahul Bhalla
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi every one
i am creating a login page in user enter there id and password so that he or she get authenticate
which is done by using

but now i want to retrive user name and title from ldap but how can i do that because i am not aware of LDAP structure or attribute
Hope for the reply
Thanks
 
Carles Gasques
Ranch Hand
Posts: 199
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rahul,

Well you need at last a valid connection to lookup what's is the ldap schema or a ldif file.
You cannot simply guess what is the ldap schema.


Best regards,

 
Rahul Bhalla
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Carles Gasques
First of thnks for the reply
I have valid connection through which i am able login but donot know to reach cn="user" and in that i have to find out for title of that user
 
Carles Gasques
Ranch Hand
Posts: 199
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rahul,

If you are using Eclipse IDE install the Apache Directory Studio plugin.
Once configured the ldap connection you could see a view with the ldap nodes tree and navigate the schema.
With this info. will be easy to complete your ldap code.


Best regards,
 
Rahul Bhalla
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Carles Gasques
Thank you for the so quick suggestion
my schema looks like this

As i authenticate the login page with help of hiven

i am able to get the value of title using below statement

but i want to that just i login through the mail id and get value of the title
 
Carles Gasques
Ranch Hand
Posts: 199
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

You have to perform a search for the mail (mail=rahulbhalla@domainName.net)



Where your base dn is probably "CN=Users,DC=domainName,DC=net"


Best regards,
 
Rahul Bhalla
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello
Thanks for help me Carles Gasques and coderanch
I need one more help from you (Carles Gasques)
Is it possible to provide me a good source (which you strongly recommend )to learn LDAP
Thanks once give
 
Bijoy Joseph
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This JNDI tutorial gives a number of examples using LDAP.The directory service examples referenced there are using LDAP .
http://www.coderpanda.com/jndi-tutorial/
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic