[Freeipa-users] Want to extend schema for ipahost

Martin Basti mbasti at redhat.com
Mon Sep 19 12:01:04 UTC 2016



On 19.09.2016 13:41, Florence Blanc-Renaud wrote:
> 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.
>

Yes please use only MAY attributes otherwise you will not be able to 
create new entries using IPA CLI/webUI

Martin^2




More information about the Freeipa-users mailing list