diff options
Diffstat (limited to 'perl-install/install_steps_interactive.pm')
-rw-r--r-- | perl-install/install_steps_interactive.pm | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index 919b9bf65..a7da036af 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -841,25 +841,21 @@ sub addUser { } } if ($o->{meta_class} eq 'firewall') { - my $v; - my $p = $o->{prefix}; - substInFile { /^admin:/ and $_=''; } "$p/etc/passwd"; - substInFile { /^admin:/ and $_=''; } "$p/etc/group"; - $v->{shell} ||= "/bin/bash"; - $o->ask_from_entries_refH([_("Set admin password"), _("Ok"), $o->{security} > 2 || $::corporate ? () : _("No password")], + my $sup = $o->{adminuser} ||= {}; + $sup->{password2} ||= $sup->{password} ||= ""; + $o->ask_from_entries_refH([_("Set admin password"), _("Ok")], [ _("Set admin password"), "\n" ], [ - _("Password") => { val => \$admin->{password}, hidden => 1 }, - _("Password (again)") => { val => \$admin->{password2}, hidden => 1 } - ], + _("Password") => { val => \$sup->{password}, hidden => 1 }, + _("Password (again)") => { val => \$sup->{password2}, hidden => 1 }, + ], complete => sub { - $admin->{password} eq $admin->{password2} or $o->ask_warn('', [ _("The passwords do not match"), _("Please try again") ]), return (1,1); - length $admin->{password} < 2 * $o->{security} + $sup->{password} eq $sup->{password2} or $o->ask_warn('', [ _("The passwords do not match"), _("Please try again") ]), return (1,1); + length $sup->{password} < 2 * $o->{security} and $o->ask_warn('', _("This password is too simple (must be at least %d characters long)", 2 * $o->{security})), return (1,0); return 0 } - ); - add2hash_($v, { name => "admin", password => $admin->{password}, realname => "Administrator", icon => 'automagic' }); - push @{$o->{users}}, $v; + ) or return; + install_steps::setAdminPassword($o); } install_steps::addUser($o); } @@ -1136,7 +1132,7 @@ Do you really want to quit now?"), 0); _("IMPORTANT, please read : For further configuration after installation, use a browser -from any computer connected to your LAN, and connect on : +from any computer connected to your LAN, and connect to : https://") . ($o->{intf}{eth0}->{BOOTPROTO} eq 'static' ? $o->{intf}{eth0}->{IPADDR} : $o->{netc}{HOSTNAME} ) . _(":8443/ Log on with your admin account")); |