[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

patch: valid usernames in /etc/security



/usr/sbin/user and /usr/sbin/adduser have been updated to allow '$' as the
last character of a username.  Here is a one-line patch to prevent
/etc/security from warning about those usernames:

-Dan

--- etc/security.orig	Tue Jun 10 17:48:49 2003
+++ etc/security	Tue Jun 10 17:49:40 2003
@@ -31,7 +31,7 @@
 		next;
 	if ($1 == "")
 		printf("Line %d has an empty login field:\n%s\n", NR, $0);
-	else if ($1 !~ /^[A-Za-z0-9_][A-Za-z0-9_-]*$/)
+	else if ($1 !~ /^[A-Za-z0-9_][A-Za-z0-9_-]*\$?$/)
 		printf("Login %s has non-alphanumeric characters.\n", $1);
 	if (length($1) > 31)
 		printf("Login %s has more than 31 characters.\n", $1);