summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/any.pm7
-rw-r--r--perl-install/install_steps.pm4
2 files changed, 8 insertions, 3 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index e37a69bf3..b1dcbb78c 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -831,6 +831,13 @@ sub user_crypted_passwd {
$u->{password} ? &crypt($u->{password}, $isMD5) : $u->{pw} || '';
}
+sub set_root_passwd {
+ my ($superuser, $authentication) = @_;
+ $superuser->{name} = 'root';
+ write_passwd_user($superuser, $authentication->{md5});
+ delete $superuser->{name};
+}
+
sub write_passwd_user {
my ($u, $isMD5) = @_;
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index b91ac2eed..f7c911d1f 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -759,9 +759,7 @@ sub configurePrinter {
sub setRootPassword {
my ($o) = @_;
$o->{superuser} ||= {};
- $o->{superuser}{name} = 'root';
- any::write_passwd_user($o->{superuser}, $o->{authentication}{md5});
- delete $o->{superuser}{name};
+ any::set_root_passwd($o->{superuser}, $o->{authentication});
install_any::set_authentication($o);
}