Skip to content

Commit

Permalink
Merge pull request #156 from yast/RootPassword
Browse files Browse the repository at this point in the history
Root password
  • Loading branch information
jreidinger authored and wfeldt committed Oct 29, 2018
1 parent de98b40 commit 84f2230
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/modules/Users.pm
Original file line number Diff line number Diff line change
Expand Up @@ -6371,9 +6371,13 @@ sub Import {

my $pw = Linuxrc->InstallInf ("RootPassword");
if (defined $pw){
# ensure that even if no user is defined, root will be written
$users_modified = 1;

$root_user{"userPassword"} =
$self->CryptPassword ($pw, "system");
y2milestone ("updating root password from install.inf");
$root_user{"userPassword"} = $self->CryptPassword ($pw, "system");
# mark that password is already encrypted, so it does not encrypt twice (bsc#1081958)
$root_user{"encrypted"} = 1;

$users{"system"}{"root"} = \%root_user;
$shadow{"system"}{"root"} = $self->CreateShadowMap(\%root_user);
Expand Down

0 comments on commit 84f2230

Please sign in to comment.