LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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, 11: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, 12:40 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,516

Rep: Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 07:36 PM
command line tool to search for celluar phone provider/carrier? lindylex Programming 7 03-01-2009 02:03 AM
Good command line utility for XML to search, edit, etc. ? lumix Linux - Software 1 05-05-2008 11:56 AM
Command line Application search TheAvenger Linux - Software 3 06-20-2006 11:12 AM
Command line to search where's the apllication installed mikeccs Linux - Newbie 7 07-23-2004 08:42 AM


All times are GMT -5. The time now is 11:48 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration