LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-12-2009, 10:05 AM   #1
knockout_artist
Member
 
Registered: Sep 2005
Distribution: fedora core 9
Posts: 324

Rep: Reputation: 33
LDAP command line search.


Hi,

I need to use command line some thing like

Code:
ldapserarch  -x -b < dc object   etc>
I am log into the server too.

But I have no idea what "dc" "dn" to use for my search.

I can see how users/group are setup from novell web interface.

Any ideas?

Thanks
 
Old 02-12-2009, 11:40 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
You can start by running:
Code:
ldapsearch -x -b 'dc=domain,dc=com' '(objectclass=*)'
for anonymous search, or
Code:
ldapsearch -x -D "cn=admin,dc=domain,dc=com" -W 'dc=domain,dc=com' '(objectclass=*)'
for a search using the admin credentials, if you don't allow anonymous searches.
Both will return all the existing entries. If you want to search something specific use the results of the previous commands as attributes reference. For example if you want to find all uids and email addresses you can run:
Code:
ldapsearch -x -b 'dc=domain,dc=com' '(objectclass=*)' uid mail
Regards
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
vim 'n' lynx: command line option to search for string Samsara Linux - Software 6 01-02-2013 06:36 PM
command line tool to search for celluar phone provider/carrier? lindylex Programming 7 03-01-2009 01:03 AM
Good command line utility for XML to search, edit, etc. ? lumix Linux - Software 1 05-05-2008 10:56 AM
Command line Application search TheAvenger Linux - Software 3 06-20-2006 10:12 AM
Command line to search where's the apllication installed mikeccs Linux - Newbie 7 07-23-2004 07:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration