diff options
author | 2002-01-02 16:19:14 +0000 | |
---|---|---|
committer | 2002-01-02 16:19:14 +0000 | |
commit | 04d55a9d6343dbab903082382c97e9d33ce1178e (patch) | |
tree | f567b5323d1331be314fbbb99190194c621d80f1 /adduser | |
parent | a4d355355c15a32766778dfba568b5162c99d7e4 (diff) | |
download | pw-darwin-04d55a9d6343dbab903082382c97e9d33ce1178e.tar.gz pw-darwin-04d55a9d6343dbab903082382c97e9d33ce1178e.tar.zst pw-darwin-04d55a9d6343dbab903082382c97e9d33ce1178e.zip |
Be consistent in what restriction is imposed on a username
in the code and what the warning message reads.
Diffstat (limited to 'adduser')
-rw-r--r-- | adduser/adduser.perl | 6 |
1 files changed, 4 insertions, 2 deletions
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; |