Subject: Re: useradd: spaces and $ in usernames
To: None <tech-userlevel@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-userlevel
Date: 11/19/2001 20:15:47
> user: Warning: non-standard login names may lead to non-obvious problems!

This implies there is a standard, which I gather is at best
questionable.  Not that it really matters to me (I won't be using user
anyway), but I'd prefer to see the message say what characters are
acceptable (or unacceptable, though the acceptable set is probably
easier to describe).

> +	/* This should cover most shells :-( */
> +	static char meta[] = "\n \t'`\";&<>()|*?{}[]\\$!#^~";

Wouldn't it be better to decide that certain characters are safe, and
then escape everything else?  Consider  or  or , which could
reasonably be metacharacters...

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B