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

Re: upgrading from 2.0.23 to 2.1.22





Marc Cuypers wrote:

Hi,

I'm running two seperate ldap-servers (ver: 2.0.23 and 2.1.22). I tried to add the data in the LDIF file to the server version 2.1.22 with the following command:

    ldapadd -d 1 -D "cn=Manager,dc=domain,dc=com" -w pwd -f person

I get the following error:

ldapadd: update failed: cn=test2 user, ou=contacts, ou=people, dc=mgvd,dc=be
ldap_add: Object class violation (65)
additional info: invalid structural object class chain (inetOrgPerson/country)


On the server with version 2.0.23 it works fine

---- start LDIF FILE
version: 1

#
# filter: (objectclass=*)
# requesting: ALL
#

##dn: ou=contacts,ou=people,dc=domain,dc=com
##ou: contacts
##objectClass: organizationalUnit

dn: cn=test2 user,ou=contacts,ou=people,dc=domain,dc=com
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: country
employeeType: A
cn: test2 user
givenName: test
sn: user
ou: people
ou: contacts
ou: test
c: BE
----------- end LDIF FILE

The problem is that the object results in two objectclasses (inetOrgPerson and country). In version 2.0 this is accepted in version 2.1 it is not anymore.

Now we have to create our own class in slapd.conf:
Added the following to slapd.conf and now it works:
objectclass ( <oid> NAME 'personalAccount' SUP (inetOrgPerson $ country) STRUCTURAL)


Change <oid> to your own oid, beginning with the code you got at IANA.

Best regards,

Marc