diff --git a/rust/agama-lib/src/users/settings.rs b/rust/agama-lib/src/users/settings.rs index f5e2bc05e5..bd5eea47af 100644 --- a/rust/agama-lib/src/users/settings.rs +++ b/rust/agama-lib/src/users/settings.rs @@ -59,6 +59,7 @@ pub struct RootUserSettings { #[serde(skip_serializing)] pub password: Option, /// Whether the password is encrypted or is plain text + #[serde(skip_serializing)] pub encrypted_password: Option, /// Root SSH public key pub ssh_public_key: Option, diff --git a/service/lib/agama/autoyast/root_reader.rb b/service/lib/agama/autoyast/root_reader.rb index 1598cc5f92..14df63e3c2 100755 --- a/service/lib/agama/autoyast/root_reader.rb +++ b/service/lib/agama/autoyast/root_reader.rb @@ -41,6 +41,8 @@ def read return {} unless root_user hsh = { "password" => root_user.password.value.to_s } + hsh["passwordEncrypted"] = true if root_user.password.value.encrypted? + public_key = root_user.authorized_keys.first hsh["sshPublicKey"] = public_key if public_key { "root" => hsh } diff --git a/service/lib/agama/autoyast/user_reader.rb b/service/lib/agama/autoyast/user_reader.rb index 1df0ec05b3..04c62d8e69 100755 --- a/service/lib/agama/autoyast/user_reader.rb +++ b/service/lib/agama/autoyast/user_reader.rb @@ -45,6 +45,9 @@ def read "fullName" => user.gecos.first.to_s, "password" => user.password.value.to_s } + + hsh["passwordEncrypted"] = true if user.password.value.encrypted? + { "user" => hsh } end