<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Thank You Flo<div><br></div><div>This helped!!!</div><div><br></div><div>Best regards,</div><div>Deepak<br><br><div>> Subject: Re: [Freeipa-users] Want to extend schema for ipahost<br>> To: deepak_dimri@hotmail.com; freeipa-users@redhat.com<br>> From: flo@redhat.com<br>> Date: Mon, 19 Sep 2016 13:41:00 +0200<br>> <br>> On 09/19/2016 01:31 PM, Deepak Dimri wrote:<br>> > Hi All,<br>> ><br>> > I want to add couple of custom attribute to IPA Host. I have already<br>> > added custom attributes and objectclass "AWSInstanceDetails" to my<br>> > schema succesfully but when i am trying to modify existing host to<br>> > include the new objectclass i am getting below error<br>> ><br>> > ldap_modify: Object class violation (65)<br>> ><br>> > additional info: missing attribute "sn" required by object class<br>> > "AWSInstanceDetails"<br>> ><br>> ><br>> > my ldif file to add the newly created objectclass.<br>> ><br>> ><br>> > dn: fqdn=testhost,dc=ddiam,dd=online<br>> ><br>> > changetype: modify<br>> ><br>> > add: objectclass<br>> ><br>> > objectclass: AWSInstanceDetails<br>> ><br>> ><br>> > How can i extend my ipahost objectclass to include additional<br>> > attributes? i followed this document to extend ipa<br>> > userobjectclass https://www.freeipa.org/images/5/5b/FreeIPA33-extending-freeipa.pdf but<br>> > now i need help with ipahost<br>> ><br>> ><br>> > As always any help would be much appreciated!<br>> ><br>> ><br>> > Thanks,<br>> ><br>> > Deepak<br>> ><br>> ><br>> ><br>> <br>> Hi Deepak,<br>> <br>> What is your schema definition for AWSInstanceDetails? If it requires <br>> the "sn" attribute as a mandatory attribute (i.e in the MUST section), <br>> then you need to define a value for sn in your ldif file. Otherwise the <br>> schema would not be respected by your object.<br>> <br>> For instance:<br>> dn: fqdn=testhost,dc=ddiam,dd=online<br>> changetype: modify<br>> add: objectclass<br>> objectclass: AWSInstanceDetails<br>> -<br>> add: sn<br>> sn: myValue<br>> <br>> If, on the contrary, you do not want the attribute to be mandatory, you <br>> can define the AWSInstanceDetails objectclass with an optional "sn" <br>> attribute, by putting sn in the MAY section.<br>> <br>> Hope this helps,<br>> Flo.<br>> <br></div></div>                                        </div></body>
</html>