From 04d55a9d6343dbab903082382c97e9d33ce1178e Mon Sep 17 00:00:00 2001 From: Yaroslav Tykhiy Date: Wed, 2 Jan 2002 16:19:14 +0000 Subject: Be consistent in what restriction is imposed on a username in the code and what the warning message reads. --- adduser/adduser.perl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'adduser/adduser.perl') diff --git a/adduser/adduser.perl b/adduser/adduser.perl index 421cf02..9084d22 100644 --- a/adduser/adduser.perl +++ b/adduser/adduser.perl @@ -328,8 +328,10 @@ sub new_users_name_valid { local($name) = @_; if ($name !~ /^[a-z0-9_][a-z0-9_\-]*$/ || $name eq "a-z0-9_-") { - warn "Wrong username. " . - "Please use only lowercase characters or digits\a\n"; + warn "Illegal username.\n" . + "Please use only lowercase Roman, decimal, underscore, " . + "or hyphen characters.\n" . + "Additionally, a username should not start with a hyphen.\a\n"; return 0; } elsif ($username{$name}) { warn "Username ``$name'' already exists!\a\n"; return 0; -- cgit v1.2.3