Solved

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

Posted on 2009-05-06
2
667 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
php56-php-mcrypt for rhel7 php56 1 105
Apache LDAP Authentication 20 53
Fuzzy search functionality DB2 UDB 3 33
Can't "Unset" Proxy in Apache headers for PCI compliance... 4 37
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é.
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…

749 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