LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-12-2010, 10:33 PM   #1
peterson.julia
Member
 
Registered: Nov 2009
Distribution: All flavors...
Posts: 37

Rep: Reputation: 1
How to search LDAP directory recursively?


How would the command for recursive search in LDAP look like when I'm searching for "cn" or "ou"?

Cant get it right

Thx
 
Old 10-12-2010, 11:04 PM   #2
frndrfoe
Member
 
Registered: Jan 2008
Distribution: RHEL, CentOS, Ubuntu
Posts: 379

Rep: Reputation: 38
When you search you can specify the scope as one, sub, or base. Sub will search the entire subtree and should be the default.

search for everything with a cn would be cn=*. What are you trying and what results do you get?
 
Old 10-13-2010, 08:56 PM   #3
peterson.julia
Member
 
Registered: Nov 2009
Distribution: All flavors...
Posts: 37

Original Poster
Rep: Reputation: 1
I think I got it!

I think this is the right sintax Right?

ldapsearch -LLL -h server -s sub -b "o=inc" "(|(cn=ldapusers) (ou=students))"
 
Old 10-14-2010, 02:15 PM   #4
frndrfoe
Member
 
Registered: Jan 2008
Distribution: RHEL, CentOS, Ubuntu
Posts: 379

Rep: Reputation: 38
ldapsearch -x -h server -b 'dc=example,dc=com' 'uid=*'
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
search recursively by exif date? rioguia Programming 6 02-21-2010 05:49 AM
How to search through all files in a folder, recursively... MJBoa Linux - Software 13 09-14-2008 11:25 PM
Search a string recursively under one directory say_hi_ravi Programming 6 07-09-2008 04:47 AM
recursively search basak Linux - Software 1 08-13-2006 10:25 AM
To recursively search with grep grautu Slackware 5 11-21-2005 02:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:31 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