Hi again!
I get error 32, having restarted using this slapd.conf: ----------- 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/misc.schema
allow bind_v2
pidfile /var/run/openldap/slapd.pid argsfile /var/run/openldap/slapd.args
database bdb suffix "dc=labbnet,dc=ne,dc=keryx,dc=se" rootdn "uid=root,dc=labbnet,dc=ne,dc=keryx,dc=se" # Preliminary password rootpw secret
directory /var/lib/ldap
index objectClass eq,pres index ou,cn,mail,surname,givenname eq,pres,sub index uidNumber,gidNumber,loginShell eq,pres index uid,memberUid eq,pres,sub index nisMapName,nisMapEntry eq,pres,sub ------------
This ldap.conf: ------------- BASE dc=labbnet,dc=ne,dc=keryx,dc=se URI ldap://localhost ------------
And this org.ldif: ------------ dn: dc=teknik,dc=labbnet,dc=ne,dc=keryx,dc=se objectclass: dcobject objectclass: organization o: Teknikprogrammet dc: teknik ------------
And - finally - this command:
ldapadd -x -f org.ldif -W -D \ "uid=root,dc=labbnet,dc=ne,dc=keryx,dc=se" -v
---------------------
Result: ---------------------
ldap_initialize( <DEFAULT> ) Enter LDAP Password: add objectclass: dcobject organization add o: Teknikprogrammet add dc: teknik adding new entry "dc=teknik,dc=labbnet,dc=ne,dc=keryx,dc=se" modify complete ldap_add: No such object (32)
----------------------
WHY?????
Lars Gunther
P.S this also fails:
gunther.ldif: -------------
dn: uid=gunther,dc=labbnet,dc=ne,dc=keryx,dc=se uid: gunther cn: Lars Gunther objectClass: account ------------- Result: ------------- ldapadd -x -f gunther.ldif -W -D "uid=root,dc=labbnet,dc=ne,dc=keryx,dc=se" -v ldap_initialize( <DEFAULT> ) Enter LDAP Password: add uid: gunther add cn: "Lars Gunther" add objectClass: account adding new entry "uid=gunther,dc=labbnet,dc=ne,dc=keryx,dc=se" modify complete ldap_add: Object class violation (65) additional info: attribute 'cn' not allowed
-------------
As does this: root@ne ldap # cat people.ou.ldif dn: ou=people, dc=labbnet,dc=ne,dc=keryx,dc=se ou: people description: All people in organisation objectclass: organizationalunit
root@ne ldap # ldapadd -x -f people.ou.ldif -W -D \ "uid=root,dc=labbnet,dc=ne,dc=keryx,dc=se" -v ldap_initialize( <DEFAULT> ) Enter LDAP Password: add ou: people add description: All people in organisation add objectclass: organizationalunit adding new entry "ou=people, dc=labbnet,dc=ne,dc=keryx,dc=se" modify complete ldap_add: No such object (32)
Frustrated? YES!