On 09/19/2016 01:31 PM, Deepak Dimri wrote:
Hi All,

I want to add couple of custom attribute to IPA Host. I have already
added custom attributes and objectclass "AWSInstanceDetails" to my
schema succesfully but when i am trying to modify existing host to
include the new objectclass i am getting below error

ldap_modify: Object class violation (65)

additional info: missing attribute "sn" required by object class
"AWSInstanceDetails"


my ldif file to add the newly created objectclass.


dn: fqdn=testhost,dc=ddiam,dd=online

changetype: modify

add: objectclass

objectclass: AWSInstanceDetails


How can i extend my ipahost objectclass to include additional
attributes? i followed this document to extend ipa
userobjectclass 
https://www.freeipa.org/images/5/5b/FreeIPA33-extending-freeipa.pdf but
now i need help with ipahost


As always any help would be much appreciated!


Thanks,

Deepak




Hi Deepak,

What is your schema definition for AWSInstanceDetails? If it requires the "sn" attribute as a mandatory attribute (i.e in the MUST section), then you need to define a value for sn in your ldif file. Otherwise the schema would not be respected by your object.

For instance:
dn: fqdn=testhost,dc=ddiam,dd=online
changetype: modify
add: objectclass
objectclass: AWSInstanceDetails
-
add: sn
sn: myValue

If, on the contrary, you do not want the attribute to be mandatory, you can define the AWSInstanceDetails objectclass with an optional "sn" attribute, by putting sn in the MAY section.

Hope this helps,
Flo.

--
Manage your subscription for the Freeipa-users mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-users
Go to http://freeipa.org for more info on the project

Reply via email to