LDAP 'description' attribute access.
Hi Friends,
Please let me know how can i access 'description' attribute stored in LDAP server from LDAP client(pam_ldap,nss_ldap). Thank you. Regards, Vijay S. |
'man ldapsearch' ?
|
no, I am running LDAP clients (pam_ldap.so and nss_ldap.so) on one linux machine and openLDAP server on the other machine. I have created few users and groups, for these entries i have created description also. I don't know how to access this 'description' attribute from client machine.
I tried using "getent passwd" "getent group", but description field is not displayed. Please let me know how to access this attribute. Thanks and Regards, Vijay S. |
In that case you probably want to map the attributes correctly, try adding:
Code:
nss_map_attribute gecos description |
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 sn: Sheelavantar objectclass: top objectclass: person objectclass: posixAccount objectclass: shadowAccount uid:vijay userpassword:123qwe uidnumber:104 gidnumber:100 loginShell:/bin/bash homeDirectory: /home/vijay description: This is user vijay's account I want to access this description attribute from LDAP server at client side. |
Performing the mapping will put the value of the description attribute into the gecos field for ldap users when running 'getent passwd'
eg. Code:
getent passwd kbp | cut -d: -f5 |
Thank you very much...:) :)
It solved my problem, now I can access the description field. Thank you. |
All times are GMT -5. The time now is 01:09 PM. |