summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authordamien <damien@mandriva.com>2001-01-11 15:54:30 +0000
committerdamien <damien@mandriva.com>2001-01-11 15:54:30 +0000
commitcac77c66f8f2f72a62c199e90c2a601d34625573 (patch)
treeb2d0624c974a6803c84536990a67a7ff77a1e618 /perl-install
parentbc4652f9fd3667e56b71a1d09214c82c175095b2 (diff)
downloaddrakx-backup-do-not-use-cac77c66f8f2f72a62c199e90c2a601d34625573.tar
drakx-backup-do-not-use-cac77c66f8f2f72a62c199e90c2a601d34625573.tar.gz
drakx-backup-do-not-use-cac77c66f8f2f72a62c199e90c2a601d34625573.tar.bz2
drakx-backup-do-not-use-cac77c66f8f2f72a62c199e90c2a601d34625573.tar.xz
drakx-backup-do-not-use-cac77c66f8f2f72a62c199e90c2a601d34625573.zip
updated
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/ChangeLog48
-rw-r--r--perl-install/install_steps.pm21
-rw-r--r--perl-install/install_steps_interactive.pm26
3 files changed, 80 insertions, 15 deletions
diff --git a/perl-install/ChangeLog b/perl-install/ChangeLog
index 541d090cc..de07b67c7 100644
--- a/perl-install/ChangeLog
+++ b/perl-install/ChangeLog
@@ -1,3 +1,51 @@
+2001-01-11 DrakX <install@linux-mandrake.com>
+
+ * dams : firewall snapshot uploaded
+
+2001-01-10 DrakX <install@linux-mandrake.com>
+
+ * dams : firewall snapshot uploaded
+
+2001-01-09 DrakX <install@linux-mandrake.com>
+
+ * dams : firewall snapshot uploaded
+
+2001-01-04 DrakX <install@linux-mandrake.com>
+
+ * dams : firewall snapshot uploaded
+
+2001-01-02 DrakX <install@linux-mandrake.com>
+
+ * dams : firewall snapshot uploaded
+
+2000-12-23 DrakX <install@linux-mandrake.com>
+
+ * dams : firewall snapshot uploaded
+
+2000-12-23 DrakX <install@linux-mandrake.com>
+
+ * snapshot uploaded
+
+2000-12-22 DrakX <install@linux-mandrake.com>
+
+ * snapshot uploaded
+
+2000-12-20 DrakX <install@linux-mandrake.com>
+
+ * dams : firewall snapshot uploaded
+
+2000-12-19 DrakX <install@linux-mandrake.com>
+
+ * dams : firewall snapshot uploaded
+
+2000-12-19 DrakX <install@linux-mandrake.com>
+
+ * snapshot uploaded
+
+2000-12-19 DrakX <install@linux-mandrake.com>
+
+ * dams : firewall snapshot uploaded
+
2000-12-12 DrakX <install@linux-mandrake.com>
* dams : firewall snapshot uploaded
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index b07443235..b6d885a78 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -603,6 +603,27 @@ sub setRootPassword($) {
print F $_;
}
}
+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 $_;
+ }
+}
#------------------------------------------------------------------------------
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"));