With ldapsearch I get something like this:

#ldapsearch -x -b dc=my,dc=org uid=test -LLL

...
displayName: Some Name
uid: test
....
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
...

How do I display content of posixAccount for example?

link|improve this question
feedback

1 Answer

To return a specific attribute for a search-list, use the following syntax:

ldapsearch -x -b dc=ad,dc=example,dc=com '(&(uid=test))' posixAccount

Which will return the posixAccount attribute of any objects that have a "uid" value equal to "test".

link|improve this answer
I'm getting something like this: # search result search: 2 result: 0 Success # numResponses: 2 # numEntries: 1 – redman Jun 21 '11 at 21:19
@Redman I may have misunderstood what you were looking for. Try it with '(&(objectClass=posixAccount))' uid instead. Which will return the UID attribute of any object with an objectClass of posixAccount. – sysadmin1138 Jun 21 '11 at 21:24
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.