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

Re: still unclear on error 69

Jon Roberts wrote:

I read your post. Did you read mine?

Dunno. But I remember clearly what it's all about.


Try it yourself. Assume and entry:

dn: cn=Mama, ou=People, o=family.org
objectclass: top
objectclass: person
cn: Mama
sn: Jones

Then try to implement the LDIF:

dn: cn=Mama, ou=People, o=family.org
changetype: modify
add: objectclass
objectclass: organizationalperson

And with ldapmodify you will get:

modifying entry "cn=Mama, ou=People, o=family.org"
ldapmodify: update failed: cn=Mama, ou=People, o=family.org
ldap_modify: Cannot modify object class (69)
additional info: structural object class modification from 'person' to 'organizationalperson' not allowed

Looks like Mama has to stay in the kitchen :(

Nailed it!

> additional info: structural object class modification from
> 'person' to 'organizationalperson' not allowed

O.k. ldapmodify is telling you that you cannot change a person to an organizationalPerson. But you can add an organizationalPerson to a person. Those are the rules. I didn't make them up, but Openldap 2.1 is pretty strict about them. 2.0 wasn't.

Try *adding* the following 'ldapadd' ldif entry:

dn: cn=Mamma2,ou=people,o=family.org
objectClass: top
objectClass: person
objectClass: organizationalPerson
sn: Jones
cn: Mamma2

Don't say it doesn't work, I just did it for you.

"Oh, but that's not what I want." says Jon. "I want to modify."

Nevertheless, that's what you are going to have to work around. Remember the hierarchy I described? Your Internet site is all about hierarchy, so you should be able to understand.

What you can do, is on your old 2.0.x machine do an 'slapcat -l ldif-file'. Then you get an ldif file that can be used with 2.1, but which will have to be edited. Transfer that to your new 2.1 machine and do 'slapadd -l ldif-file'. It will barf all over the place. So you edit your ldif file and gradually change each objectclass and attribute for each entry, until it does not barf any more. You can do vi's ':g/whatihad/s//whatiwant/gc' can't you? If not, now's a good time to learn :) Don't forget what ^ and $ mean in vi. I just had to do it for a high school in Amsterdam - all the students, all the lecturers, all the machines etc. etc. Took me a morning to do.

If you're using a gtk Unix/Linux, consider compiling and installing GQ 0.7.0b2. It'll teach you a lot. That's how I learned.



Tony Earnshaw

Looking backwards is always easy with hindsight

Mail: tonni@billy.demon.nl