useradd suggests --badname when it won't help (username too long)
orlitzky opened this issue · 8 comments
$ useradd --badname -d "/home/2022.txindependencehealthplan.com" -m "2022.txindependencehealthplan.com"
useradd: invalid user name '2022.txindependencehealthplan.com': use --badname to ignore
The length check (< 32 characters) is still enforced. If you drop 3 chars from the username, does it then proceed?
Yes, but that's the wrong username :)
Oh. I was thinking this was a regression from when --badnames
had an "s" on it, but looking back at my notes, the --badnames
was used only to allow the username to begin with a "2". The length was still a problem that I had to hack around in /etc/passwd
, /etc/group
, and /etc/shadow
last year.
For something constructive... I suppose useradd shouldn't tell me to use --badname
if it won't help?
Oh. I was thinking this was a regression from when
--badnames
had an "s" on it, but looking back at my notes, the--badnames
was used only to allow the username to begin with a "2". The length was still a problem that I had to hack around in/etc/passwd
,/etc/group
, and/etc/shadow
last year.For something constructive... I suppose useradd shouldn't tell me to use
--badname
if it won't help?
Indeed, that's an unfortunate mis-direction.