Ever noticed such messages?
Appliance password for root user expired, please change password for root user from virtual machine console.
But if you can’t login because of account locked out, or forgotten password, what should you do next?
In my example with the identity manager, I am unable to login with root.
Well, there is a very simple solution for this :), No not do a redeploy, or revert snapshot or whatever…
Ofcourse there is a KB article to fix this, but I will show this in my blog!
First, reboot the appliance you want to gain acces to:
Keep the console Window open! And when the Photon OS Splash screen is visible, press E:
When Entering E, you will see the next screen:
Add : rw init=/bin/bash to the end of the line which starts with linux
Then press F10 to continue boot
In the console screen:
Type in : mount -o remount,rw /
Then, after hitting enter.
Type in passwd and type in the new password (twice)
If you want to set the password to never expire, do the following:
chage -I -1 -m 0 -M 99999 -E -1 root
After updating the password and/or doing the expiration change, type in umount /
And final, type in reboot -f
After rebooting I am able to login again 🙂