Reading Time: 2 minutes

Patching my lab’s vCenter Server Appliance this evening raised an issue whereby the root password had expired. Unable to login via root, I can still administer the appliance via a vCenter’s SSO domain account (administrator@vsphere.local, for instance), however, attempts to perform any updates will not be possible until the appliance’s root account password is reset. This an easy exercise, however, this is not possible via vSphere UI or console, only bash.

VCSA Password Reset via Bash

Note, the below procedure is relevant to vCenter Server Appliance 6.5 and 6.7.

1. Firstly (and most importantly) ensure you’ve taken a snapshot of your vCenter Server Appliance.
2. Restart the vCenter Server Appliance.
3. Once the OS initiates, press the e key to enter the GNU GRUB Edit Menu.
4. Append rw init=/bin/bash to the line beginning with linux.VCSA Password Reset via Bash

5. When ready, press F10.
6. Once the bash console has loaded, enter the passwd command. When prompted, enter and confirm your new password.VCSA Password Reset via Bash

7. Unmount the filesystem via the command umount / and reboot via the command reboot -f.VCSA Password Reset via Bash

8. Once the vCenter Server Appliance has restarted login via root and the new password. If you can login, the password reset procedure has been successful.
9. Finally, remove the snapshot taken in step 1.

Following the successful password reset, re-run any pre-update checks. These should now pass successfully.

VCSA Password Reset via Bash

Further Reading

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.