You are not logged in.

#1 2015-06-13 09:42:19

Weytsengtang
Member
Registered: 2014-10-22
Posts: 8

Why don't Linux user names "support" Punycode?

Hello,

just a question out of curiosity: Why doesn't Linux support Punycode for non-ascii user names?

For example, if I had the user "Jörg", who wants to create a user name "jörg". When I do “useradd jörg”, he tells me that jörg is not a valid username. Well, I guess many Linux/Unix services only support ASCII user names, so changing it to UTF-8 would be difficult.

So I wonder why not use Punycode? In DNS, this worked without any breaking of the DNS system, so why shouldn't it work for Linux user names? Of course, I could just create the user xn--jrg-sna and work with that, but then I would just see the user name "xn--jrg-sna" everywhere. It would be nice if the desktop environments would always show the Unicode version, then.

What do you think about this?

Offline

#2 2015-06-13 13:19:33

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: Why don't Linux user names "support" Punycode?

Actually ASCII has lots of symbols that are not allowed in usernames.

man useradd wrote:

Usernames must start with a lower case letter or an underscore, followed by lower case letters, digits,
       underscores, or dashes. They can end with a dollar sign. In regular expression terms: [a-z_][a-z0-9_-]*[$]

It does look like that may be enough to use Punycode .
However, having to type in punycode for login, then seeing it displayed as UTF-8 would confuse a lot of people i think.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2015-06-18 15:33:27

Weytsengtang
Member
Registered: 2014-10-22
Posts: 8

Re: Why don't Linux user names "support" Punycode?

Yes, in retrospect, I also thought that it would be easier to just enable UTF8 for usernames, better than Punycode.

Offline

Board footer

Powered by FluxBB