I feel silly… using ldapadd with the –x switch
seems to work. Can’t believe the time I wasted checking this, seems I was
doing the wrong kind of authentication. From: Nuno Manuel Martins Hello everyone again, I didn’t have
any help that would lead me to fix this, so I have spent some hours trying to
understand things better but still haven’t got there. I changed my
ldif.file and now looks like this: dn: uid=myuser,dc=example,dc=com uid: myuser cn: myuser sn: Doe uidnumber: 10001 gidnumber: 10001 homedirectory: /home/ldap/john loginshell: /bin/bash userPassword: password objectclass: person objectclass: posixaccount I am trying to add
this entry with the following command: ldapadd -D
"cn=manager,dc=example,dc=com" -W -f /root/tmp/tstuser.ldif From the client I get
the following message: adding new entry "uid=myuser,dc=example,dc=com" ldap_add: No such object (32) I have put the slapd
in debug mode and I get a lot of messages. In order not to flood the list I
will post what I think are the relevant ones. If you need to see the whole
messages let me know and I’ll use an attachment or something. ber_scanf fmt (}) ber: >>> dnPrettyNormal:
<uid=myuser,dc=example,dc=com> => ldap_bv2dn(uid=myuser,dc=example,dc=com,0) <= ldap_bv2dn(uid=myuser,dc=example,dc=com)=0 => ldap_dn2bv(272) <= ldap_dn2bv(uid=myuser,dc=example,dc=com)=0 => ldap_dn2bv(272) <= ldap_dn2bv(uid=myuser,dc=example,dc=com)=0 <<< dnPrettyNormal:
<uid=myuser,dc=example,dc=com>, <uid=myuser,dc=example,dc=com> bdb_dn2entry("uid=myuser,dc=example,dc=com") => bdb_dn2id("dc=example,dc=com") <= bdb_dn2id: get failed: DB_NOTFOUND: No matching
key/data pair found (-30989) bdb_referrals: tag=104
target="uid=myuser,dc=example,dc=com" matched="" ==> bdb_add: uid=myuser,dc=example,dc=com oc_check_required entry (uid=myuser,dc=example,dc=com),
objectClass "person" oc_check_required entry (uid=myuser,dc=example,dc=com),
objectClass "posixAccount" oc_check_allowed type "uid" oc_check_allowed type "cn" oc_check_allowed type "sn" oc_check_allowed type "uidNumber" oc_check_allowed type "gidNumber" oc_check_allowed type "homeDirectory" oc_check_allowed type "loginShell" oc_check_allowed type "userPassword" oc_check_allowed type "objectClass" oc_check_allowed type "structuralObjectClass" bdb_dn2entry("uid=myuser,dc=example,dc=com") => bdb_dn2id("dc=example,dc=com") <= bdb_dn2id: get failed: DB_NOTFOUND: No matching
key/data pair found (-30989) bdb_add: parent does not exist send_ldap_result: conn=15 op=3 p=3 send_ldap_result: err=10 matched=""
text="" send_ldap_response: msgid=4 tag=105 err=32 I googled around for
that DB_NOTFOUND problem and all I got were some ideas about permissions, but
I’m starting OpenLDAP as root so I don’t think that is it. Maybe
something I skipped on installation of OpenLDAP? Is there any step needed to
initialize the DB? This is my slapd.conf: include
/usr/local/etc/openldap/schema/core.schema include
/usr/local/etc/openldap/schema/cosine.schema include
/usr/local/etc/openldap/schema/inetorgperson.schema include
/usr/local/etc/openldap/schema/nis.schema pidfile
/usr/local/var/run/slapd.pid argsfile
/usr/local/var/run/slapd.args database bdb suffix
"dc=example,dc=com" rootdn
"cn=manager,dc=example,dc=com" rootpw [something] directory /usr/local/var/openldap-data index objectClass eq If anyone can help,
it would be really appreciated. Thank you, Nuno
|