mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2024-11-22 05:53:09 +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:
parent
9392c66b45
commit
24c46489a2
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user