From eedcec1c020376ce24f9476533841cd399b8753d Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Fri, 9 Mar 2018 16:25:58 -0800 Subject: [PATCH] Try and fix root password setting approach assert_script_run and chroot don't mix...let's try chpasswd. Signed-off-by: Adam Williamson --- tests/_do_install_and_reboot.pm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/_do_install_and_reboot.pm b/tests/_do_install_and_reboot.pm index 39ad742d..7169d906 100644 --- a/tests/_do_install_and_reboot.pm +++ b/tests/_do_install_and_reboot.pm @@ -110,9 +110,7 @@ sub run { # if we didn't set a root password during install, set it # now...this is kinda icky, but I don't see a great option if (get_var("INSTALLER_NO_ROOT")) { - assert_script_run "chroot /mnt/sysimage"; - assert_script_run "echo $root_password | passwd --stdin root"; - assert_script_run "exit"; + assert_script_run "echo 'root:$root_password' | chpasswd -R /mnt/sysimage"; } type_string "reboot\n"; }