[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Can't search database
Uno Engborg wrote:
>
> Hi, I'm very new to LDAP so this is probably very simple, but I have
> RTFMed since before christmas and are still
> completely stuck, so someone please help me on the right track.
>
> The problem is that I can't search things added to the database.
> (What I am trying to do in the end, is to use ldap instead of NIS for a
> linux system.
> but so far I am just experimenting with adding, changing and removing
> items in the database)
>
> I run openldap 2.0.11 on RedHat 7.2
>
> I add the items by running:
> ldapadd -x -w secret -D "cn=ldapmanager,dc=engborgs,dc=com" -h
> 192.168.0.19 -f test.ldif
>
> It seams that the items really are added, since the can be listed by
> slapcat if I shut down the server.
> So it should be OK so far. (I include the test.ldif file, if so you can
> see the structure)
>
> Then if I try to find the added items by doing:
> ldapsearch -x -w secret -D "cn=ldapmanager,dc=engborgs,dc=com" -h
> 192.168.0.19 "(objectclass=*)"
>
> And get nothing in return but this:
>
> version: 2
>
> #
> # filter: (objectclass=*)
> # requesting: ALL
> #
>
> # search result
> search: 2
> result: 32 No such object
You're not providing a base for your search; try adding a
-b 'dc=engborgs,dc=com'
to your ldapsearch
Pierangelo.
--
Dr. Pierangelo Masarati | voice: +39 02 2399 8309
Dip. Ing. Aerospaziale | fax: +39 02 2399 8334
Politecnico di Milano |
mailto:pierangelo.masarati@polimi.it
via La Masa 34, 20156 Milano, Italy |
http://www.aero.polimi.it/~masarati