[master/f21-branch][PATCH] Strip suggested usernames to 8 characters

Vratislav Podzimek vpodzime at redhat.com
Thu Sep 11 06:20:13 UTC 2014


On Wed, 2014-09-10 at 14:16 -0400, David Shea wrote:
> On 09/10/2014 01:55 PM, Vratislav Podzimek wrote:
> > On Tue, 2014-08-26 at 10:40 +0200, Vratislav Podzimek wrote:
> >> This is a practical and widely used pattern.
> >>
> >> Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
> >> ---
> >>   pyanaconda/users.py | 3 ++-
> >>   1 file changed, 2 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/pyanaconda/users.py b/pyanaconda/users.py
> >> index 82cd2d3..f25c8fa 100644
> >> --- a/pyanaconda/users.py
> >> +++ b/pyanaconda/users.py
> >> @@ -192,8 +192,9 @@ def guess_username(fullname):
> >>       if len(fullname) > 1:
> >>           username = fullname[0].decode("utf-8")[0].lower() + username
> >>   
> >> +    # strip accents and make the username at most 8 characters long
> >>       username = strip_accents(username).encode("utf-8")
> >> -    return username
> >> +    return username[0:8]
> >>   
> >>   class Users:
> >>       def __init__ (self):
> > Anybody against this change on master?
> >
> 
> Do any other tools in Fedora strip or warn about long user names? I 
> don't see any reason to do this if long usernames aren't breaking something.
Well, it would help all Red Hat employees, i.e. a lot of Fedora users
installing Fedora. I understand that you don't see it with your
username ;)

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list