summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/any.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 9632689b6..aee740bfe 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -553,7 +553,7 @@ sub ask_users {
$u->{password} eq $u->{password2} or $in->ask_warn('', [ N("The passwords do not match"), N("Please try again") ]), return (1,2);
$security > 3 && length($u->{password}) < 6 and $in->ask_warn('', N("This password is too simple")), return (1,2);
$u->{name} or $in->ask_warn('', N("Please give a user name")), return (1,0);
- $u->{name} =~ /^[a-z0-9_-]+$/ or $in->ask_warn('', N("The user name must contain only lower cased letters, numbers, `-' and `_'")), return (1,0);
+ $u->{name} =~ /^[a-z]+?[a-z0-9_-]*?$/ or $in->ask_warn('', N("The user name must contain only lower cased letters, numbers, `-' and `_'")), return (1,0);
length($u->{name}) <= 32 or $in->ask_warn('', N("The user name is too long")), return (1,0);
member($u->{name}, 'root', map { $_->{name} } @$users) and $in->ask_warn('', N("This user name has already been added")), return (1,0);
return 0;