I don't have a strong opinion either, but given that scripts would
ignore the warnings and the resulting numeric users are going to face
random, seemingly unrelated issues thanks to the interaction with
systemd, I think I prefer the failure.

FWIW, I've prepared a test version in a PPA[1] which keeps the rules
from Debian[2] but prevents the fully numeric names. This is what it
looks like:

$ useradd 0
useradd: invalid user name '0'

$ echo $?
3

$ sudo useradd 0c0

$ sudo useradd 0 --badnames

$ cat /etc/passwd | grep ^0
0c0:x:1001:1001::/home/0c0:/bin/sh
0:x:1002:1002::/home/0:/bin/sh



[1] https://launchpad.net/~vtapia/+archive/ubuntu/sf305373
[2] 
https://salsa.debian.org/debian/shadow/-/blob/master/debian/patches/506_relaxed_usernames

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1927078

Title:
  Don't allow useradd to use fully numeric names

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/shadow/+bug/1927078/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to