Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2009-05-06
2
Medium Priority
?
687 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 2000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
In this article, we’ll look at how to deploy ProxySQL.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

688 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