Problems getting LDAP to work

Russell Fulton (r.fulton@auckland.ac.nz)
Tue, 18 Jun 1996 09:19:58 +1200 (NZT)

Greetings all,

I am having trouble setting up a LDAP 3.3 server here on a Solaris 2.5
system. I think I have missed something fundermental so I would be
very grateful if some one can point out where I have slipped up.

I have constructed a ldif file from our email aliases file:

dn: "o=The University of Auckland, c=NZ"
o: The University of Auckland
objectclass: organisation

dn: cn=Gaye Aarons, o=The University of Auckland, c=NZ
cn: Gaye Aarons
sn: Aarons
mail: g.aarons
objectclass: person

dn: cn=Stephanie Abbott, o=The University of Auckland, c=NZ
cn: Stephanie Abbott
sn: Abbott
mail: s.abbott
objectclass: person

.........

in a file /usr/local/ldap/data/aliases.

then run 'etc/ldif2ldbm -i data/aliases -f etc/slapd.conf &'
(/usr/local/ldap is the root of the ldap installation.)

The configuration file etc/slapd.conf is:

include /usr/local/ldap/etc/slapd.at.conf
include /usr/local/ldap/etc/slapd.oc.conf
schemacheck off
referral ldap://ldap.itd.umich.edu

#######################################################################
# ldbm database definitions
#######################################################################

database ldbm
suffix "o=The University of Auckland, c=NZ"
directory /usr/local/ldap/data
rootdn "cn=root, o=The University of Auckland, c=NZ"
rootpw secret
dbcachesize 5000000
index cn,sn,uid pres,eq
index objectclass pres,eq
index default none

This produces a set of index filess:

bluebottle:/usr/local/ldap >ls -l data
total 20774
-rw-r--r-- 1 russell ccc 5 Jun 17 17:23 NEXTID
-rw-r--r-- 1 russell ccc 510713 Jun 14 10:16 aliases
-rw------- 2 russell ccc 434176 Jun 17 19:25 cn.ndbm.dir
-rw------- 2 russell ccc 434176 Jun 17 19:25 cn.ndbm.pag
-rw------- 2 russell ccc 2989256 Jun 17 19:17 dn.ndbm.dir
-rw------- 2 russell ccc 2989256 Jun 17 19:17 dn.ndbm.pag
-rw------- 2 russell ccc 500358 Jun 17 17:24 dn2id.ndbm.dir
-rw------- 2 russell ccc 500358 Jun 17 17:24 dn2id.ndbm.pag
-rw------- 2 russell ccc 24591 Jun 17 17:24 id2children.ndbm.dir
-rw------- 2 russell ccc 24591 Jun 17 17:24 id2children.ndbm.pag
-rw------- 2 russell ccc 772024 Jun 17 17:23 id2entry.ndbm.dir
-rw------- 2 russell ccc 772024 Jun 17 17:23 id2entry.ndbm.pag
-rw------- 2 russell ccc 122893 Jun 17 19:22 objectclass.ndbm.dir
-rw------- 2 russell ccc 122893 Jun 17 19:22 objectclass.ndbm.pag
-rw------- 2 russell ccc 245767 Jun 17 19:29 sn.ndbm.dir
-rw------- 2 russell ccc 245767 Jun 17 19:29 sn.ndbm.pag

Which look plasuible.

I then start slapd and run ldapsearch...

bluebottle:/usr/local/ldap >sudo etc/slapd -f etc/slapd.conf
bluebottle:/usr/local/ldap >bin/ldapsearch 'objectclass=*'
ldap_search: No such object

Here is what turns up in the syslog:

Jun 18 09:03:51 bluebottle.ccc slapd[17762]: slapd starting
Jun 18 09:03:54 bluebottle.ccc slapd[17762]: conn=0 fd=7 connection from unknown (130.216.4.28)
Jun 18 09:03:54 bluebottle.ccc slapd[17762]: conn=0 op=0 BIND dn="" method=128
Jun 18 09:03:54 bluebottle.ccc slapd[17762]: conn=0 op=0 RESULT err=0 tag=97 nentries=0
Jun 18 09:03:54 bluebottle.ccc slapd[17762]: conn=0 op=1 SRCH base="o=The University of Auckland,c=NZ" scope=2 filter="(objectclass=*)"
Jun 18 09:03:55 bluebottle.ccc slapd[17762]: conn=0 op=1 RESULT err=32 tag=101 nentries=0
Jun 18 09:03:55 bluebottle.ccc slapd[17762]: conn=0 op=2 UNBIND
Jun 18 09:03:55 bluebottle.ccc slapd[17762]: conn=0 op=2 fd=7 closed errno=11

I'm sorry this post is so long but I thought it best to include all the
bits that might contain clues as to what is wrong. (Even so I bound to have missed something vital ;-)

Please trim as appropriate if you post your replies back to the list
although it is probably better to mail me direct. I'll happily
sumarise for the list if there is interest.

Cheers and Thanks, Russell.

+-------------------------------------------------------------------+
| Russell Fulton 'phone +64 9 373-7599 x 8955 |
| ITSS fax +64 9 373-7425 |
| University of Auckland email r.fulton@auckland.ac.nz |
| Private Bag 92019 time gmt -12 (-13 oct - mar) |
| Auckland, New Zealand. |
+-------------------------------------------------------------------+