LDAP query for memberof detail from Linux command line


I am trying to query LDAP\AD for the memberof detail to be returned (for a specific user) from the Linux Command line. ldapsearch doesn't work on my Linux distribution. 9(CentOS 5.8)
Is there a linux command that can be used to query LDAP?


Who is Participating?
MazdajaiConnect With a Mentor Commented:
You can use getent. getent is an alternative command for ldapsearch.

getent passwd 'user1'

Open in new window

Charlie_MelegaAuthor Commented:
Excellent, thanks Mazdajai.

What if I wanted to run an LDAP query from a linux system?.
 i.e., I want to run the following query to look up a user's DN:


How can I run this LDAP query from a linux command line and have it return query resilts for given username?

Thank You
Without having ldapsearch you aren't going to be able to do what you want.  Is there an issue with installing it.

Another option is to use something like JXPlorer
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.