Allow people to add users with dots in their names. http://bugs.gentoo.org/show_bug.cgi?id=22920 Index: libmisc/chkname.c =================================================================== RCS file: /cvsroot/shadow/libmisc/chkname.c,v retrieving revision 1.8 diff -u -r1.8 chkname.c --- libmisc/chkname.c 12 May 2003 05:29:14 -0000 1.8 +++ libmisc/chkname.c 10 Jan 2005 06:25:47 -0000 @@ -18,7 +18,7 @@ static int good_name (const char *name) { /* - * User/group names must match [a-z_][a-z0-9_-]* + * User/group names must match [a-z_][a-z0-9_-.$]* */ if (!*name || !((*name >= 'a' && *name <= 'z') || *name == '_')) return 0; @@ -27,6 +27,7 @@ if (!((*name >= 'a' && *name <= 'z') || (*name >= '0' && *name <= '9') || *name == '_' || *name == '-' || + *name == '.' || (*name == '$' && *(name + 1) == '\0'))) return 0; } Index: man/useradd.8 =================================================================== RCS file: /cvsroot/shadow/man/useradd.8,v retrieving revision 1.23 diff -u -r1.23 useradd.8 --- man/useradd.8 11 Dec 2004 20:05:01 -0000 1.23 +++ man/useradd.8 10 Jan 2005 06:40:15 -0000 @@ -128,6 +128,23 @@ .PP If no options are specified, \fBuseradd\fR displays the current default values.\&. +.SH RESTRICTS +Currently, the shadow suite enforces the following restrictions on +user names: + +.nf +\- must begin with a lower case letter or underscore +\- can only contain lower case letters, underscores, and dashes +\- may end with a dollar sign +\- regex for these requirements: [a\-z_][a\-z0-9_\-$]* +.fi + +The length of usernames is restricted by glibc (via the UT_NAMESIZE define +in the utmp header file). This may range from 8 characters on older +systems to 32 characters on newer systems. + +Note Gentoo adds a patch which allows people to create usernames with a +dot in them. .SH "NOTES" .PP