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

Re: upgrading from 2.0.23 to 2.1.22

2.0.x did not have proper schema checking with regard to this issue. I think the way that it works is that all of your structural objectClasses must be in a single inheritance chain. I'm not familiar with the country objectClass (and you haven't shown us the schema file that it's defined in), but it doesn't really make sense for a person to also "be" a country. If you want to associate a particular country (or more than one country) with each person, then I would advise using a country attribute instead of a country objectClass.

If I'm not understanding your model and your objectClass country is truly something that each one of your entries "must" have then I guess my advice would be to create a duplicate objectclass (call it something like myCountry or personCountry), and build a schema file that specifies it. Try to just take the objectClass country you've been working with and change it from Structural to Auxiliary (I suggest the renaming because it's bad practice to modify someone else's schema definitions -- if on the other hand, you created the objectClass country, then I guess it's up to you whether you want to just change the schema without renaming).

good luck, ~c

Marc Cuypers wrote:

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

Somebody an idea?

Best regards,