LDAP query for memberof detail from Linux command line

Hello,

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?

Thanks,

Charlie
Charlie_MelegaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

MazdajaiCommented:
You can use getent. getent is an alternative command for ldapsearch.

getent passwd 'user1'

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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:

(&(objectCategory=Person)(objectClass=user)(sAMAccountName=username))

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

Thank You
0
sweetfa2Commented:
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
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Networking

From novice to tech pro — start learning today.