[Freeipa-devel] UID and email address suggestion algorithms

Simo Sorce ssorce at redhat.com
Thu Sep 6 03:38:28 UTC 2007


On Wed, 2007-09-05 at 17:28 -0700, Kevin McCarthy wrote:
> This code was committed previously, but deserves some discussion before
> it sees the light of day.  Right now the code is in controllers.py:
> suggest_uid and suggest_email.
> 
> The uid tries in the following order:
> - givenname[0] + sn[:7]
> - givenname[:7] + sn[0]
> - (givenname + sn)[:8]
> - sn[:8]
> - lastly, it appends an incrementing counter to givenname[0] + sn[:7]
> 
> For the email address, the code isn't activated yet, but I suggest
> trying:
> - "%s.%s@%s" % (givenname, sn, domain)
> - the result of suggest_uid() @domain
> 
> Comments?  Do you think the ordering is good?

I am sure customers will come asking for customizing the way this is
done.
Every company you visit have their own standards to create user names
and sometimes they simply cannot be changed.
Is there any chance we can express this as a set of regexp stored on the
directory that the app fetches? This way they can be easily customized.

Simo.




More information about the Freeipa-devel mailing list