TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [TCLUG:8560] username stuff



> This may be a stupid question, but I need to find a spec on usernames
> under linux, and the man pages, HOWTOs, the O'Reilly Nutshell book, and
> the assorted other docs on my system seem to not mention what forbidden
> characters and whatnot there is, although I remember seeing it at some
> point.  This is what I know for sure:
>
> 1) username must be 1-8 chars
> 2) The first char must be a letter
> 3) none of: ':','=',','
> 4) no control characters
>
> What other chars are verboten?
> Are there any other restrictions?
>

  IIRC, usernames can *only* contain alphabetical, numerical, "-", "_" or
"." characters.

  A perl subroutine I was using to test for e-mail address validity puts it
this way -- I don't know if it's totally accurate: /^[\w\-]+[\w\-\.]*/
(This would seem to imply that numbers, underscores and hyphens are okay as
starting characters...)

  Linux will allow names of just about any length.  However, I don't know if
it actually uses all those letters -- it may not differentiate between
"solomon_grundy" and "solomon_grundy_jr"