summaryrefslogtreecommitdiffstats
path: root/perl-install/any.pm
diff options
context:
space:
mode:
authorDaouda Lo <daouda@mandriva.com>2003-05-27 14:05:09 +0000
committerDaouda Lo <daouda@mandriva.com>2003-05-27 14:05:09 +0000
commit67ff8d4aaa2fddd17adc2374ef461697d36605f9 (patch)
tree03621305ebed7c0fba47b65b9b215c14f7d68f47 /perl-install/any.pm
parent358240a6408c8da8b85da35b0bc740e183f066f5 (diff)
downloaddrakx-backup-do-not-use-67ff8d4aaa2fddd17adc2374ef461697d36605f9.tar
drakx-backup-do-not-use-67ff8d4aaa2fddd17adc2374ef461697d36605f9.tar.gz
drakx-backup-do-not-use-67ff8d4aaa2fddd17adc2374ef461697d36605f9.tar.bz2
drakx-backup-do-not-use-67ff8d4aaa2fddd17adc2374ef461697d36605f9.tar.xz
drakx-backup-do-not-use-67ff8d4aaa2fddd17adc2374ef461697d36605f9.zip
- user name must begin with a letter but not with a number or - or _
Diffstat (limited to 'perl-install/any.pm')
-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;