Solved

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

Posted on 2009-05-06
2
681 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 14

Accepted Solution

by:
Monis Monther 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Recently I was talking with Tim Sharp, one of my colleagues from our Technical Account Manager team about MongoDB’s scalability. While doing some quick training with some of the Percona team, Tim brought something to my attention...
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

615 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