VCenter 6.5 Appliance (VCSA) password recovery procedure failing

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:

  1. Restart your VCenter appliance and wait for the Photon OS Splash screen during boot
  2. Hit the letter “E” on the keyboard to edit grub menu
  3. Next add the following to the end of the line that starts with linux: rw init=/bin/bash
  4. Hit the F10 key on your keyboard to boot
  5. At the root  prompt, enter passwd (hit enter) set your normal password (twice)
  6.  run: unmount /
  7. 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:

  1. Restart your VCenter appliance and wait for the Photon OS Splash screen during boot
  2. Hit the letter “E” on the keyboard to edit grub menu
  3. Next add the following to the end of the line that starts with linux: rw init=/bin/bash
  4. Hit the F10 key on your keyboard to boot
  5. At the root  prompt, enter passwd (hit enter) set your normal password (twice)
  6.  run: pam_tally2 –reset –user root
  7.  run: unmount /
  8. run: reboot -f