[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: unknown LDAP result code (-30991)



You are correct.  There is some form of bug in processing the error code.
It as triggered by using ldapmodify without the -a switch.

I still have an error which I would like to solve. Now when using the -a
switch

>From the command line:

C:\OpenLDAP Debug>ldapmodify -x -D "cn=Manager,dc=pivod,dc=com" -W -f
example.ldif -a
Enter LDAP Password:
adding new entry "dc=pivod,dc=com"
ldapmodify: update failed: dc=pivod,dc=com
ldap_add: No such attribute (16)
        additional info: value of naming attribute 'dc' is not present in
entry

My slapd.conf includes:

include  c:/openldap-schema/core.schema
include  c:/openldap-schema/pivod.schema

database  bdb
suffix  "dc=pivod,dc=com"
rootdn  "cn=Manager,dc=pivod,dc=com"
rootpw  secret
directory c:/openldap-bdb
index objectClass eq


My ldif file is:

dn: dc=pivod,dc=com
objectclass: dcObject
objectclass: organization
o: Example Company
dc: example

dn: cn=Manager,dc=pivod,dc=com
objectclass: organizationalRole
cn: Manager

>From the slapd debug dump:

conn=0 op=1 ADD dn="dc=pivod,dc=com"
bdb_dn2entry_rw("dc=pivod,dc=com")
=> bdb_dn2id_matched( "dc=pivod,dc=com" )
<= bdb_dn2id_matched: no match
==> bdb_add: dc=pivod,dc=com
bdb_add: entry failed schema check: value of naming attribute 'dc' is not
presen
t in entry (16)
send_ldap_result: conn=0 op=1 p=3
send_ldap_result: err=16 matched="" text="value of naming attribute 'dc' is
not
present in entry"
send_ldap_response: msgid=2 tag=105 err=16

I am using openLDAP 2.1.16 compiled on a win2k system using VC++.  I have
berkeley 4.1.25 back-end

I delete the bdb database files, then start up slapd.  The ldapmodify is the
first command I run.

I am trying to follow the example from the openldap.org instruction pages

From: "Pierangelo Masarati" <ando@sys-net.it>


>
> > I am using openldap version 2.1.16 compiled with the Berkeley 4.1.25
> > database.  These are the versions I am running, so there should be no
> > problem, but there is.
> >
>
> I think my previous answer was incomplete.   It appears that you're
> trying to modify an entry when the database does not exist, that's
> why you get an error.  The bug is in the return code: slapd is not
> returning an LDAP error code, but an error code from Berkeley db;
> there is no doubt your problem lies somewhere else, though.
> Try doing an add before a modify.
>
> p.