Subject: Re: useradd: spaces and $ in usernames
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Alistair Crooks <firstname.lastname@example.org>
Date: 11/16/2001 09:07:48
On Thu, Nov 15, 2001 at 09:27:35PM -0500, der Mouse wrote:
> > Usernames  have had a specific character limitation for a Very Long
> > Time,
> Where is this restriction documented, and what exactly _is_ the
> restriction? I've been hanging around UNIX variants for long enough
> that I'd've expected to have picked up on it, but I don't recall
> anything of the sort. I've seen "alphanumeric, ., _, -"; does that
> include non-ASCII letters, and if so, in which charset? (And if not,
> do _you_ want to be the one who tells Søren "I'm sorry, Hels can have
> username hels, but you can't have username søren, because our OS is
> stuck in an English-centric view of the world? :-)
> And, speaking of that limitation...where did it go? As I reported, I
> tried a control-B in a username and it passed smoke-test, at least. Is
> there something critical I didn't try that would fall over?
The user(8) utility was coded by me, working from the Solaris man
pages. Solaris has/had such a restriction. Note the use of isalnum(3)
in the code - you'll get that for your locale - well, you would if
I'd set the locale in the program - and so non ASCII 7 bit characters
should be used where appropriate.
There are also some places where NetBSD has veered from that old
manpage - these are #ifdefed with the definition EXTENSIONS.
> > Opening up spaces and $s is, IMHO, asking for trouble.
> Perhaps. But the system is already full enough of foot-pointed pistols
> that I don't see much harm in one more. Especially when, as the
> message that started this off noted, there's something useful that
> requires this particular one.
If this were to go in (and I dislike the idea in general), I'd want
a special switch to enable this kind of thing - it should not be
on by default. I am not pressing my view of the world onto everyone
else, merely stating that, by veering from the path taken by every
other Unix system I have ever known, we should highlight it in very