Solved

ladapsearch- how to search whether an user account already exists in ldap

Posted on 2009-05-06
2
652 Views
Last Modified: 2013-12-24
Hi,

I want to verify if an user account already exists in LDAP or not.
If its local authentication, i would do
# grep <userid> /etc/passwd
and I will know if user acct already exits or not. I am not sure how to find out the same in the case of LDAP.
Please let me know what the command and options would be if I need to verify user acct in LDAP.
Thanks in advance.
0
Comment
Question by:vmwarecv1
2 Comments
 
LVL 14

Accepted Solution

by:
small_student earned 500 total points
ID: 24317656
ldapsearch -x -b uid=mark,ou=people,dc=domain,dc=com "objectclass=*"

where -x means without SASL authentication , if you are using SASL authentication then omit the -x
              -b means your base search , from which part of the directory you are searching

uid will be the user name
ou=people  I am assuming that this is your ou that holds uses, it might be people instead of user ou=people
domain is your top level domain and dc=com is your root domain . if you were xyz.net then it will be dc=xyz,dc=net.


If sucessfull you should get a list of the users attributes on the screen
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now