From eedcec1c020376ce24f9476533841cd399b8753d Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Mar 10 2018 00:25:58 +0000 Subject: Try and fix root password setting approach assert_script_run and chroot don't mix...let's try chpasswd. Signed-off-by: Adam Williamson --- diff --git a/tests/_do_install_and_reboot.pm b/tests/_do_install_and_reboot.pm index 39ad742..7169d90 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"; }