How to reset the lost or forgotten root password in vCenter Server Appliance 6.7 U1 and later (75174)

ssh vcenter.markalston.net -l administrator@vsphere.local
Warning: Permanently added 'vcenter.markalston.net' (ED25519) to the list of known hosts.

VMware vCenter Server 7.0.3.00100

Type: vCenter Server with an embedded Platform Services Controller

administrator@vsphere.local@vcenter.markalston.net's password:
Connected to service

    * List APIs: "help api list"
    * List Plugins: "help pi list"
    * Launch BASH: "shell"

Command> shell
Shell is disabled.
Command> shell.set --enable true
Command> shell
    ---------- !!!! WARNING WARNING WARNING !!!! ----------

Your use of "pi shell" has been logged!

The "pi shell" is intended for advanced troubleshooting operations and while
supported in this release, is a deprecated interface, and may be removed in a
future version of the product.  For alternative commands, exit the "pi shell"
and run the "help" command.

The "pi shell" command launches a root bash shell.  Commands within the shell
are not audited, and improper use of this command can severely harm the
system.

Help us improve the product!  If your scenario requires "pi shell," please
submit a Service Request, or post your scenario to the
https://communities.vmware.com/community/vmtn/vcenter/vc forum and add
"appliance" tag.

sso-user@vcenter [ ~ ]$ sudo -i
Password:
Authentication failed
sso-user@vcenter [ ~ ]$ sudo -i
Password:

    * List APIs: "help api list"
    * List Plugins: "help pi list"
    * Launch BASH: "shell"

Command> shell
Shell access is granted to root
root@vcenter [ ~ ]# passwd
New password: R@d10head!@#$
Retype new password: R@d10head!@#$

To unlock the account: sudo pam_tally2 –user root –reset


This project is for educational and home lab purposes.