0

I follow http://opendj.forgerock.org/opendj-server/doc/admin-guide/index/chap-schema.html to add a custom attribute to perosn class in opendj

1)create packt-services-user-blog attribute 2)create packt-services-user-class class, and add packt-services-user-blog attribute 3)create custom-attr.ldif dn: uid=user.0, ou=People,dc=example, dc=com changetype: modify add: objectClass objectClass: person

add: packt-services-user-blog packt-services-user-blog: Testing 1,2,3 .... 4) ./ldapmodify \ --port 389 \ --hostname www.openam.example.com \ --bindDN "cn=Directory Manager" \ --bindPassword opendj \ --filename custom-attr.ldif

But I get an error as follows: Result:20 Message: can not modify entity uid=user.0,ou=People,dc=example,dc=com,Cause there are more than one reduplicated value in attribute objectClass : person

I guess this error results from I don't add attribute packt-services-user-blog to person successfully

So How can I fix this problem?

yskyj
  • 141
  • 1
  • 12

1 Answers1

0

I think the error message is quite explicit : Do not add ObjectClass: Person, because it creates duplicate values.

You need to add your custom objectClass: Packt-Services-User-Class and its attribute(s).

The packt-services-user-class needs to be defined as Auxiliary and then it can be added to any entry.

Regards,

Ludovic

Ludovic Poitou
  • 4,788
  • 2
  • 21
  • 30
  • Thanks,I should define packt-class as auxiliary. But after I update attribute in opendj, I can't create a new user. I get openam.idrepo.ldap.DJLDAPv3Repo exception number 65. I don't know why – yskyj Jul 29 '14 at 08:57
  • Sorry for the late reply, just noticed this now. Error 65 means objectclass violation. Either you have an old version of OpenDJ and you are hitting a known limitation (restart will solve the problem), or you are trying to force AM to write something that is not compliant with the schema. – Ludovic Poitou Oct 01 '14 at 13:11