[Freeipa-users] FreeIPA 2, adding Samba attributes

Adam Young ayoung at redhat.com
Thu Jun 9 21:45:15 UTC 2011


On 06/09/2011 03:37 PM, John S. Skogtvedt wrote:
> Den 09. juni 2011 14:31, skrev Simo Sorce:
>> You probably want to use the DNA plugin to generate the sambaSid for you
>> once you have a domain SID, it's not too difficult and will be much less
>> error prone.
>>
>> Simo.
>>
> Thanks. The solution outlined at
> http://www.mail-archive.com/freeipa-users@redhat.com/msg00111.html works
> for me, at least for user objects (didn't try the group part yet).

It should be relatively trivial to add support in the WebUI for Samba, 
but nothing would be broken without it. All that would happen is that 
the WebUI would lack fields for the Samba specific attributes.  Assuming 
that ipa user-add works, you would want to add the field as an attribute 
in user.py.  To add it after groupID:

Int('gidnumber?',
             label=_('GID'),
             doc=_('Group ID Number'),
             default_from=lambda uid: uid,
Int('sambasid?',
             label=_('SAMBA SID'),
             doc=_('Samba SID Number')

I have to admit I'm not sure what the rules would be for default values 
for sambaSID.

   Once you have ipa user-add working, if you want to extend the web UI, 
the file to modify is /usr/share/ipa/ui/user.js.  What you would want to 
do is to add in a filed sambaSID.  I'd be prone to put it under the  
section  with the name: 'account'.  It should  be a text field, so you 
just need to add an entry for sambasid.  I'd put it under 'gidnumber'.  
That looks like this:


             {
                 name: 'account',
                 fields: [
                     { factory: IPA.user_status_widget, name: 
'nsaccountlock' },
                     'uid',
                     { factory: IPA.user_password_widget, name: 
'userpassword' },
                     'uidnumber',
                     'gidnumber',
                     'sambasid',
                     'loginshell',
                     'homedirectory'
                 ]
             },


> _______________________________________________
> Freeipa-users mailing list
> Freeipa-users at redhat.com
> https://www.redhat.com/mailman/listinfo/freeipa-users




More information about the Freeipa-users mailing list