LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-17-2007, 01:19 PM   #1
cbonar
Member
 
Registered: Apr 2004
Location: Paris, FRANCE
Distribution: Ubuntu
Posts: 54

Rep: Reputation: 16
Lightbulb LDAP > ldapsearch doesn't print the entries when bound as normal user


Hello,

I'm currently setting up a 'home' ldap server for authentication purposes and I'm having problems understanding the output of the ldapsearch command.

In short, my base looks as follows :
Code:
dc = colanet
\--cn = admin
\--ou = people
   \--uid = cbonar
When I'm doing a search on all elements in the base as a user of "ou=people", the answer is the following :

Code:
cbonar@colabox:~$ ldapsearch -x -W -D "uid=cbonar,ou=people,dc=colanet"
Enter LDAP Password:
# extended LDIF
#
# LDAPv3
# base <> with scope subtree
# filter: (objectclass=*)
# requesting: ALL
#

# search result
search: 2
result: 0 Success

# numResponses: 1
It seems to be ok (numResponses = 1) but why is no entry listed ?
When I do the same command as the admin I've plenty of entries and in the end the following lines :

Code:
...

# search result
search: 2
result: 0 Success

# numResponses: 8
# numEntries: 7
Shouldn't the entry of the user who made the search be printed at least ?

Last edited by cbonar; 09-17-2007 at 01:21 PM. Reason: wrong title
 
Old 09-18-2007, 10:27 AM   #2
mpapet
Member
 
Registered: Nov 2003
Location: Los Angeles
Distribution: debian
Posts: 548

Rep: Reputation: 72
Not Necessarily

Your regular user account needs to have permission to read the whole tree. You need a new entry in slapd.conf for that regular user.
 
Old 09-22-2007, 01:19 PM   #3
cbonar
Member
 
Registered: Apr 2004
Location: Paris, FRANCE
Distribution: Ubuntu
Posts: 54

Original Poster
Rep: Reputation: 16
I got it working : it was indeed an access problem.

My slapd.conf had this directive :
Code:
access to *
        by dn="cn=admin,dc=colanet" write
        by * auth
        by self write
Reading the 'access' chapter of the ldap admin guide, I figured out that the order of the 'by who' clauses was wrong : the 'by self' was never matched (because 'by *' applies to all and is read before).

Thanks for giving me the right direction !
 
  


Reply

Tags
authentication, ldap, ldapsearch



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
Giving user 'www-data' same permissions as normal user MikeOfAustin Linux - Software 5 06-08-2007 02:50 AM
LDAP server not starting as user LDAP klnasveschuk Fedora 1 02-15-2007 04:49 AM
perl and net::ldap how to return dn from a search jonlake Programming 2 02-24-2006 12:46 PM
LDAP bind instead of search request corbis_demon Linux - Newbie 0 07-02-2004 11:35 AM
Games runs slow as normal user, but fast as root user mcore Linux - Software 2 06-07-2004 11:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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