I'm trying to get ldapd working on 6.0-stable. Using the man page and
/etc/examples/ldapd.conf I've created the following configuration file:

    schema "/etc/ldap/core.schema"
    schema "/etc/ldap/inetorgperson.schema"
    schema "/etc/ldap/nis.schema"

    listen on lo0 secure

    namespace "dc=example,dc=com" {
        rootdn          "cn=admin,dc=example,dc=com"
        rootpw          "secret"
    }

Starting ldapd as root gives the following output:

    # ldapd -vd
    Oct 28 20:31:20.800 [83362] parsing config /etc/ldapd.conf
    Oct 28 20:31:20.800 [83362] parsing schema file
    '/etc/ldap/core.schema'
    Oct 28 20:31:20.804 [83362] parsing schema file
    '/etc/ldap/inetorgperson.schema'
    Oct 28 20:31:20.805 [83362] parsing schema file
    '/etc/ldap/nis.schema'
    Oct 28 20:31:20.806 [83362] parsing namespace dc=example,dc=com
    Oct 28 20:31:20.807 [83362] startup
    Oct 28 20:31:20.812 [46832] listening on 127.0.0.1:389
    Oct 28 20:31:20.812 [46832] listening on fe80:3::1:389
    Oct 28 20:31:20.812 [46832] listening on ::1:389
    Oct 28 20:31:20.812 [46832] opening namespace dc=example,dc=com
    Oct 28 20:31:20.812 [46832] ldape: entering event loop

All seems fine up until here. I try to add the following ldif:

    dn: ou=people,dc=example,dc=com
    objectClass: organizationalUnit
    ou: people

This results in:

    $ ldapadd -D 'cn=admin,dc=example,dc=com' -x -w secret -f in.ldif 
    adding new entry "ou=people,dc=example,dc=com"
    ldap_add: No such object (32)

The server gives this output for the ldapadd commands received:

    Oct 28 20:35:56.526 [60646] accepted connection from 127.0.0.1 on fd
    11
    Oct 28 20:35:56.526 [60646] consumed 46 bytes
    Oct 28 20:35:56.527 [60646] got request type 0, id 1
    Oct 28 20:35:56.527 [60646] bind dn = cn=admin,dc=example,dc=com
    Oct 28 20:35:56.527 [60646] successfully authenticated as
    cn=admin,dc=example,dc=com
    Oct 28 20:35:56.527 [60646] sending response 1 with result 0
    Oct 28 20:35:56.527 [60646] consumed 91 bytes
    Oct 28 20:35:56.527 [60646] got request type 8, id 2
    Oct 28 20:35:56.527 [60646] adding entry ou=people,dc=example,dc=com
    Oct 28 20:35:56.528 [60646] dc=example,dc=com: dn not found
    Oct 28 20:35:56.528 [60646] sending response 9 with result 32
    Oct 28 20:35:56.528 [60646] consumed 7 bytes
    Oct 28 20:35:56.529 [60646] got request type 2, id 3
    Oct 28 20:35:56.529 [60646] current bind dn =
    cn=admin,dc=example,dc=com
    Oct 28 20:35:56.529 [60646] end-of-file on connection 11
    Oct 28 20:35:56.529 [60646] closing connection 11

So it seems it can't find the baseDN or namespace somehow. What am I
doing wrong? The database files seem to be created just fine in
/var/db/ldap/.

Cheers,
Frank

Reply via email to