[Freeipa-devel] UID and email address suggestion algorithms

Karl MacMillan kmacmill at redhat.com
Thu Sep 6 17:49:32 UTC 2007


On Thu, 2007-09-06 at 09:20 -0700, Kevin McCarthy wrote:
> Rob Crittenden wrote:
> > 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?
> >
> > Should it enforce a minimum uid length?
> 
> Don't know.  I know we need to support many different systems, so I
> thought "lowest common denominator" would be 8 chars.  I'm reluctant to
> increase this unless someone confirms it's okay.
> 

Even this might be unacceptable in some places - so it would need to be
defeatable or configurable.

Karl




More information about the Freeipa-devel mailing list