1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-25 23:33:07 +00:00

desktop_login: use chpasswd not passwd to set user password

This allows us to use assert_script_run, and be more reliable.
Same approach used in _do_install_and_reboot postinstall stuff.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2020-11-12 10:26:10 -08:00
parent 9392c66b45
commit 24c46489a2

View File

@ -29,9 +29,7 @@ sub adduser {
assert_script_run "useradd -c '$name' $login";
if ($password ne "askuser") {
# If we want to create a user with a defined password.
type_very_safely "passwd $login\n";
type_password $password;
type_password $password;
assert_script_run "echo '$login:$password' | chpasswd";
}
else {
# If we want to create a user without a password,