Use Profile API to get the particular attributes from LDAP.
example:
JSPProvider p=(JSPProvider)pageContext.getAttribute("JSPProvider");
Session ses=p.getSession();
Profile pro=ses.getUserProfile();
String fname=pro.getAttributeString("iwtAuthMemebership-usersFirstName");
-SaralaVijay
For reference look into the Javadocs of iPS
You have to setup external ldap configuration to make this work.
Go to the admin console and manage domains/domain name. Now you will see external ldap configuration there, click on it and give your ldap server name and configuration there. Now scroll down to the bottom of the page and look for attribute mapping.
Here you map the portal attributes with your external ldap attributes. for example
you would map something like this
iwtUser-firstName=firstName
This would map portal attributes with your ldap server ..
Take a look at this article for more info ..
http://knowledgebase.iplanet.com/ikb/kb/articles/4650.html
HTH ..