The other week I was resetting the root password on a few VCenter appliances. 2 out of the 3 appliances went well. The last one I encountered was not so easy. At first I figured maybe I fat-fingered the password, but after a few retries with the same results I looked elsewhere.
A normal password recovery consist of:
- Restart your VCenter appliance and wait for the Photon OS Splash screen during boot
- Hit the letter “E” on the keyboard to edit grub menu
- Next add the following to the end of the line that starts with linux: rw init=/bin/bash
- Hit the F10 key on your keyboard to boot
- At the root prompt, enter passwd (hit enter) set your normal password (twice)
- run: unmount /
- run: reboot -f
This is exactly what I did and the new password would still not work after reboot. I would enter root as the username, when I entered the password I would see “account locked after x retries” I then tried using: pam_tally –reset –user root (directly after resetting my root password during recovery (In between set 5 & 6, but I still had issues.
The final work-around was to try: pam_tally2 –reset –user root
To recap:
- Restart your VCenter appliance and wait for the Photon OS Splash screen during boot
- Hit the letter “E” on the keyboard to edit grub menu
- Next add the following to the end of the line that starts with linux: rw init=/bin/bash
- Hit the F10 key on your keyboard to boot
- At the root prompt, enter passwd (hit enter) set your normal password (twice)
- run: pam_tally2 –reset –user root
- run: unmount /
- run: reboot -f