
How to Make a User with a Numeric Username in Linux (2014) - polm23
https://www.dampfkraft.com/how-to-make-a-numeric-username-in-linux.html
======
gerdesj
_usernames are strings, and what exactly is in them doesn 't matter._

"1234" _is_ a string in anyone's language. I have to say I've never thought of
doing this and can't see a use for it but I'll bet there are some lovely bugs
to be discovered. Also, you can have more than one name -> uid. There can be
multiple uid = 0 for example, indeed calling uid = 0 "root" is only a
convention and is also unnecessary.

~~~
ardy42
> but I'll bet there are some lovely bugs to be discovered.

[https://github.com/systemd/systemd/issues/6237](https://github.com/systemd/systemd/issues/6237)

> systemd can't handle the process previlege that belongs to user name starts
> with number, such as 0day

Apparently systemd will run services owned by users with a name that starts
with a digit as root.

~~~
giornogiovanna
I always wonder how bugs (is this a bug?) like that, and that one time when
you could log into macOS by repeatedly pressing "Login"[0] even happen. Like,
what's the logic behind that?

[0]: [https://threatpost.com/critical-apple-login-bug-puts-
macos-h...](https://threatpost.com/critical-apple-login-bug-puts-macos-high-
sierra-systems-at-risk/129028/)

~~~
chrisseaton
Reading the issue it looks like Poettering confidently replies that these
aren't valid user names, but then when he's challenged to defend that he tries
to walk it back to being just not a good idea. So that's how it happens.
People make unwarranted assumptions.

------
tyingq
I imagine there's quite a lot of utilities that will break.

This bug in systemd mentions a few other utilities that have trouble:
[https://access.redhat.com/solutions/3103631](https://access.redhat.com/solutions/3103631)

It's likely not an exhaustive list either.

~~~
mistaken
Not to mention that it's really confusing if the username is numeric, but the
uid != uname. I guess that's why the old debian set uid to uname in this case.

------
polm23
Hey, author here. While I wrote this in 2014 I still take the same steps when
setting up a user on a new box, and I haven't had any new problems with it.

Do note I only do this on personal machines - in shared environments or at
work I generally use my initials.

------
mitchtbaum
If it ain't broke, don't fix it.

If it is broken, then fix it, or break it so others can see.

