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
# numResponses: 1
Any idea what I am doing wrong? Doesnt all objects have an object
class? I was execting a listing of all items
from that query. I suspect that I start the search from the wron place
in the tree or somthing. But I really can't
figure out what's wron on my own.
My slapd.conf looks like this:
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/nis.schema
include /etc/openldap/schema/redhat/rfc822-MailMember.schema
include /etc/openldap/schema/redhat/autofs.schema
include /etc/openldap/schema/redhat/kerberosobject.schema
d
atabase ldbm
suffix "dc=engborgs,dc=com"
rootdn "cn=ldapmanager,dc=engborgs,dc=com"
rootpw secret
directory /var/lib/ldap
index objectClass,uid,uidNumber,gidNumber,memberUid eq
index cn,mail,surname,givenname eq,subinitial
Thanks!
Uno Engborg
dn: dc=engborgs,dc=com
dc: engborgs
objectClass: top
objectClass: domain
dn: ou=People,dc=engborgs,dc=com
ou: People
objectClass: top
objectClass: organizationalUnit
dn: ou=Group,dc=engborgs,dc=com
ou: Group
objectClass: top
objectClass: organizationalUnit
dn: cn=daemon,ou=Group,dc=engborgs,dc=com
objectClass: posixGroup
objectClass: top
cn: daemon
userPassword: {crypt}x
gidNumber: 2
memberUid: bin
memberUid: root
dn: cn=sys,ou=Group,dc=engborgs,dc=com
objectClass: posixGroup
objectClass: top
cn: sys
userPassword: {crypt}x
gidNumber: 3
memberUid: adm
memberUid: bin
memberUid: root
dn: uid=root,ou=People,dc=engborgs,dc=com
uid: root
cn: root
objectClass: account
objectClass: posixAccount
objectClass: top
objectClass: shadowAccount
userPassword: {crypt}xxxxxxxxxxxxxxxxxx
shadowLastChange: 11615
shad
owMax: 99999
shadowWarning: 7
loginShell: /bin/bash
uidNumber: 0
gidNumber: 0
homeDirectory: /root
gecos: root