<div dir="ltr"><div class="gmail_default" style="font-family:'trebuchet ms',sans-serif">​Thanks. I will take a look. However will using this attr only on new users from the time it was added have any issues ?</div><div class="gmail_default" style="font-family:'trebuchet ms',sans-serif"><br></div><div class="gmail_default" style="font-family:'trebuchet ms',sans-serif">Also, will replication include this new attr ?​</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 23 March 2015 at 21:57, Martin Kosek <span dir="ltr"><<a href="mailto:mkosek@redhat.com" target="_blank">mkosek@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You would need to extend user-mod to add this objectclass to existing modified<br>
users. There is an example of such plugin in the PDF I mentioned.<br>
<div class="HOEnZb"><div class="h5"><br>
On 03/23/2015 05:22 PM, Prashant Bapat wrote:<br>
> Hi Rob,<br>
><br>
> Yes I did restart it.<br>
><br>
> Ok another problem. I'm not able to add this attr to existing users. Only<br>
> the new ones. Any pointers ?<br>
><br>
> Thanks.<br>
> --Prashant<br>
><br>
> On 23 March 2015 at 21:19, Rob Crittenden <<a href="mailto:rcritten@redhat.com">rcritten@redhat.com</a>> wrote:<br>
><br>
>> Prashant Bapat wrote:<br>
>>> Ok the command you gave me worked. But I was following the PDF and below<br>
>>> command never worked.<br>
>>><br>
>>> ipa config-mod --addattr=ipaUserObjectClasses=ApigeeUserAttr<br>
>>><br>
>>> Is that expected ?<br>
>><br>
>> Did you restart httpd after adding the schema? A cached copy is used and<br>
>> restarting will cause it to re-read the schema.<br>
>><br>
>> rob<br>
>><br>
>>><br>
>>> Thanks.<br>
>>> --Prashant<br>
>>><br>
>>><br>
>>> On 23 March 2015 at 17:37, Prashant Bapat <<a href="mailto:prashant@apigee.com">prashant@apigee.com</a><br>
>>> <mailto:<a href="mailto:prashant@apigee.com">prashant@apigee.com</a>>> wrote:<br>
>>><br>
>>>     Martin,<br>
>>><br>
>>>     Thanks!<br>
>>><br>
>>>     Let me double check.<br>
>>><br>
>>>     Yes I was referring to the exact same pdf.<br>
>>><br>
>>>     Regards.<br>
>>>     --Prashant<br>
>>><br>
>>>     On 23 March 2015 at 16:49, Martin Kosek <<a href="mailto:mkosek@redhat.com">mkosek@redhat.com</a><br>
>>>     <mailto:<a href="mailto:mkosek@redhat.com">mkosek@redhat.com</a>>> wrote:<br>
>>><br>
>>>         On 03/23/2015 10:19 AM, Prashant Bapat wrote:<br>
>>>         > Hi,<br>
>>>         ><br>
>>>         > I'm trying to add a custom attribute to user object. Below is<br>
>>>         the ldif i'm<br>
>>>         > using.<br>
>>>         ><br>
>>>         > dn: cn=schema<br>
>>>         > changetype: modify<br>
>>>         > add: attributeTypes<br>
>>>         > attributeTypes: (2.16.840.1.113730.3.8.11.31.1 NAME<br>
>>>         'ipaSshSigTimestamp'<br>
>>>         > DESC 'SSH public key signature and timestamp' EQUALITY<br>
>>>         octetStringMatch<br>
>>>         > SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 X-ORIGIN 'CUSTOM FREEIPA<br>
>>>         EXTENTION' )<br>
>>>         > -<br>
>>>         > add: objectclasses<br>
>>>         > objectclasses: ( 2.16.840.1.113730.3.8.11.31.2 NAME<br>
>>>         'ApigeeUserAttr' SUP<br>
>>>         > top AUXILIARY DESC 'CUSTOM FREEIPA EXTENTION' MAY<br>
>>>         ipaSshSigTimestamp )<br>
>>>         ><br>
>>>         > This gets added successfully using the ldapmodify command as<br>
>>>         directory<br>
>>>         > manager. But both the UI and the ipa config-mod commands<br>
>>>         refuse to add the<br>
>>>         > new attribute to ipaUserObjectClasses with error objectclass<br>
>>>         not found.<br>
>>>         ><br>
>>>         > What I'm I doing wrong ?<br>
>>><br>
>>>         Not sure yet, the schema above looks OK (except some typos). I<br>
>>>         tried it on my<br>
>>>         VM, and it just worked:<br>
>>><br>
>>>         # ldapmodify -D "cn=Directory Manager" -x -w Secret123<br>
>>>         ...<br>
>>>         modifying entry "cn=schema"<br>
>>><br>
>>>         # ipa config-mod<br>
>>><br>
>>  --userobjectclasses={ipaobject,person,top,ipasshuser,inetorgperson,organizationalperson,krbticketpolicyaux,krbprincipalaux,inetuser,posixaccount,ApigeeUserAttr}<br>
>>>         ...<br>
>>>           Default user objectclasses: ipaobject, person, top, ipasshuser,<br>
>>>         inetorgperson, organizationalperson,<br>
>>>                                       krbticketpolicyaux,<br>
>> krbprincipalaux,<br>
>>>         ApigeeUserAttr, inetuser,<br>
>>>                                       posixaccount<br>
>>><br>
>>><br>
>>>         # ipa user-add apigee --first Foo --last Bar --setattr<br>
>>>         ipaSshSigTimestamp=barbar<br>
>>>         -------------------<br>
>>>         Added user "apigee"<br>
>>>         -------------------<br>
>>>           User login: apigee<br>
>>>           First name: Foo<br>
>>>           Last name: Bar<br>
>>>           Full name: Foo Bar<br>
>>>           Display name: Foo Bar<br>
>>>           Initials: FB<br>
>>>           Home directory: /home/apigee<br>
>>>           GECOS: Foo Bar<br>
>>>           Login shell: /bin/sh<br>
>>>           Kerberos principal: apigee@F21<br>
>>>           Email address: apigee@f21.test<br>
>>>           UID: 1889400080<br>
>>>           GID: 1889400080<br>
>>>           Password: False<br>
>>>           Member of groups: ipausers<br>
>>>           Kerberos keys available: False<br>
>>><br>
>>><br>
>>>         # ldapsearch -Y GSSAPI -b<br>
>>>         'uid=apigee,cn=users,cn=accounts,dc=f21' uid<br>
>>>         ipaSshSigTimestamp<br>
>>>         SASL/GSSAPI authentication started<br>
>>>         SASL username: admin@F21<br>
>>>         SASL SSF: 56<br>
>>>         SASL data security layer installed.<br>
>>>         # extended LDIF<br>
>>>         #<br>
>>>         # LDAPv3<br>
>>>         # base <uid=apigee,cn=users,cn=accounts,dc=f21> with scope<br>
>> subtree<br>
>>>         # filter: (objectclass=*)<br>
>>>         # requesting: uid ipaSshSigTimestamp<br>
>>>         #<br>
>>><br>
>>>         # apigee, users, accounts, f21<br>
>>>         dn: uid=apigee,cn=users,cn=accounts,dc=f21<br>
>>>         uid: apigee<br>
>>>         ipaSshSigTimestamp: barbar<br>
>>><br>
>>>         # search result<br>
>>>         search: 4<br>
>>>         result: 0 Success<br>
>>><br>
>>>         # numResponses: 2<br>
>>>         # numEntries: 1<br>
>>><br>
>>><br>
>>><br>
>>>         BTW, did you read one of the very relevant upstream guides how<br>
>>>         to add custom<br>
>>>         attributes to LDAP? It pretty much covers the procedure you are<br>
>>>         working on:<br>
>>><br>
>>><br>
>> <a href="http://www.freeipa.org/images/5/5b/FreeIPA33-extending-freeipa.pdf" target="_blank">http://www.freeipa.org/images/5/5b/FreeIPA33-extending-freeipa.pdf</a><br>
>>><br>
>>>         Martin<br>
>>><br>
>>><br>
>>><br>
>>><br>
>>><br>
>><br>
>><br>
><br>
<br>
</div></div></blockquote></div><br></div>