summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordamien <damien@mandriva.com>2000-12-22 19:42:49 +0000
committerdamien <damien@mandriva.com>2000-12-22 19:42:49 +0000
commitae0dc40f3a45a6c517f03657378c519a4ee7b3a6 (patch)
treef0d9f13f52ff7dc953d8361634fc129ef997d099
parent02fc4c7fe2fe3600b0cf4c145656f108a0977c63 (diff)
downloaddrakx-ae0dc40f3a45a6c517f03657378c519a4ee7b3a6.tar
drakx-ae0dc40f3a45a6c517f03657378c519a4ee7b3a6.tar.gz
drakx-ae0dc40f3a45a6c517f03657378c519a4ee7b3a6.tar.bz2
drakx-ae0dc40f3a45a6c517f03657378c519a4ee7b3a6.tar.xz
drakx-ae0dc40f3a45a6c517f03657378c519a4ee7b3a6.zip
corrected admin user setting for firewall install.
-rw-r--r--perl-install/install_steps.pm23
-rw-r--r--perl-install/install_steps_interactive.pm55
2 files changed, 26 insertions, 52 deletions
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 9beec337b..b07443235 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -606,29 +606,6 @@ sub setRootPassword($) {
#------------------------------------------------------------------------------
-my @etc_pass_fields = qw(name pw uid gid realname home shell);
-sub setAdminPassword($) {
- my ($o) = @_;
- my $p = $o->{prefix};
- my $u = $o->{adminuser} ||= {};
-
- $u->{pw} ||= $u->{password} && any::crypt($u->{password}, $o->{authentication}{md5});
-
- my @lines = cat_(my $f = "$p/etc/passwd") or log::l("missing passwd file"), return;
-
- local *F;
- open F, "> $f" or die "failed to write file $f: $!\n";
- foreach (@lines) {
- if (/^admin:/) {
- chomp;
- my %l; @l{@etc_pass_fields} = split ':';
- add2hash($u, \%l);
- $_ = join(':', @$u{@etc_pass_fields}) . "\n";
- }
- print F $_;
- }
-}
-
sub addUser($) {
my ($o) = @_;
my $p = $o->{prefix};
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index f0daf96fa..42faefeff 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -804,20 +804,6 @@ sub addUser {
my @fields = qw(realname name password password2);
my @shells = map { chomp; $_ } cat_("$o->{prefix}/etc/shells");
- $o->{meta_class} eq 'firewall' and !$admin->{set} and
- $o->ask_from_entries_refH([_("Set admin password"), _("Ok"), $o->{security} > 2 || $::corporate ? () : _("No password")],
- [ _("Set admin password"), "\n" ], [
-_("Password") => { val => \$admin->{password}, hidden => 1 },
-_("Password (again)") => { val => \$admin->{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}
- and $o->ask_warn('', _("This password is too simple (must be at least %d characters long)", 2 * $o->{security})), return (1,0);
- return 0
- }
- ) and $admin->{set}=1 or return;
- install_steps::setAdminPassword($o);
if (($o->{security} >= 1 || $clicked)) {
$u->{icon} = translate($u->{icon});
if ($o->ask_from_entries_refH(
@@ -854,6 +840,24 @@ _("Password (again)") => { val => \$admin->{password2}, hidden => 1 }
goto &addUser;
}
}
+ if ($o->{meta_class} eq 'firewall') {
+ my $v;
+ $v->{shell} ||= "/bin/bash";
+ $o->ask_from_entries_refH([_("Set admin password"), _("Ok"), $o->{security} > 2 || $::corporate ? () : _("No password")],
+ [ _("Set admin password"), "\n" ], [
+ _("Password") => { val => \$admin->{password}, hidden => 1 },
+ _("Password (again)") => { val => \$admin->{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}
+ 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;
+ }
install_steps::addUser($o);
}
@@ -1126,21 +1130,15 @@ Do you really want to quit now?"), 0);
if ($o->{meta_class} eq 'firewall') {
$o->ask_warn('',
- _("Congratulations, installation is complete.
-Remove the boot media and press return to reboot.
-
-For further configuration, connect on https://$o->{netc}{HOSTNAME}:8443/ with your admin account
-
-****************************************
+ _("IMPORTANT, please read :
-For information on fixes which are available for this release of Linux-Mandrake,
-consult the Errata available from http://www.linux-mandrake.com/.
-
-Information on configuring your system is available in the post
-install chapter of the Official Linux-Mandrake User's Guide.")) if $alldone && !$::g_auto_install;
- } else {
- $o->ask_warn('',
- _("Congratulations, installation is complete.
+For further configuration after installation, use a browser
+from any computer connected to your LAN, and connect on :
+https://$o->{netc}{HOSTNAME}:8443/
+Log on with your admin account"));
+ }
+ $o->ask_warn('',
+ _("Congratulations, installation is complete.
Remove the boot media and press return to reboot.
For information on fixes which are available for this release of Linux-Mandrake,
@@ -1148,7 +1146,6 @@ consult the Errata available from http://www.linux-mandrake.com/.
Information on configuring your system is available in the post
install chapter of the Official Linux-Mandrake User's Guide.")) if $alldone && !$::g_auto_install;
- }
}