[Freeipa-users] Question about migration and scripts variables

Rob Crittenden rcritten at redhat.com
Mon Aug 20 12:56:51 UTC 2012


James James wrote:
> Hi,
>
> my first question is about the migrate process. Is it possible to
> renumber the users during the migrate process (ipa migrate-ds) in a way
> that all imported users will have a new UID ?

I haven't tested this but you might try 
--user-ignore-attribute=uidnumber,gidnumber.

> my second question is about ipalib. I wanted to make a hook on the user
> creation. The hook works fine. I just want to know if there is a way to
> have the value of variables like the username, the name of the creator,
> the e-mail of the creator and stuff like that.

The current user is available via: principal = getattr(context, 'principal')

Using this you can look up that user:

(binddn, bindattrs) = find_entry_by_attr("krbprincipalname", principal, 
"krbPrincipalAux")

rob




More information about the Freeipa-users mailing list