I am creating one RHEL7.8 machine with s390x arch in Openstack using terraform and running init.sh
file in user_data
I got the below error log while executing any command in init.sh
file.
my init.sh file
echo "Start executing bootstrap...\n"
echo -e "${root_pwd}\n${root_pwd}" | sudo passwd root
echo "Changed Root account password"
sudo yum update -y
i got below error msg
Start executing bootstrap...\n
sudo: Account or password is expired, reset your password and try again
Changing password for root.
sudo: no tty present and no askpass program specified
sudo: unable to change expired password: Authentication token manipulation error
Changed Root account password
sudo: Account or password is expired, reset your password and try again
sudo: no tty present and no askpass program specified
sudo: unable to change expired password: Authentication token manipulation error
When I login to machine manually and try sudo passwd root
it is working fine.
Why it is not working through terraform