I tried this, but didn't get the required information.
Let me explain what i need clearly. when i issue "getent passwd" or "getent group" commands I'll get the user information like name,uid,gid. getent will internally use getpwnam() or getgrnam() functions to fetch the information from LDAP server running on the other machine.
Similarly I want to fetch "description" attribute from a perticular user entry, example entry is shown below.
dn: cn=Vijay Sheelavantar, ou=people, dc=samsung, dc=com
cn: Vijay S Sheelavantar
description: This is user vijay's account
I want to access this description attribute from LDAP server at client side.