Skip to content

Commit

Permalink
Merge pull request #160 from yast/backport-root_password
Browse files Browse the repository at this point in the history
Root password
  • Loading branch information
imobachgs committed Jun 5, 2018
2 parents 380d267 + 075d465 commit 876e2da
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
7 changes: 7 additions & 0 deletions package/yast2-users.changes
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Jun 4 14:04:17 UTC 2018 - jreidinger@suse.com

- Fix import of RootPassword if user is specified in autoyast
profile (bsc#1081958)
- 3.2.16

-------------------------------------------------------------------
Fri Apr 6 13:34:48 UTC 2018 - igonzalezsosa@suse.com

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-users.spec
Expand Up @@ -17,7 +17,7 @@


Name: yast2-users
Version: 3.2.15
Version: 3.2.16
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
8 changes: 6 additions & 2 deletions src/modules/Users.pm
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 876e2da

Please sign in to comment.