Reset a lost or forgotten root password for vCenter Server Appliance (VCSA) 6.7 Update 1, 7.x, 8.x and 9.x without performing a system reboot.
Note: The above symptoms can also occur on an external Platform Services Controller (PSC) running on vSphere 6.5 and 6.7.
The resolution has two sections for the problem that we usually encounter:
shell.set --enable trueshellsudo -ipam_tally2 --user=root --reset/usr/sbin/faillock --user root --reset Note: pam_tally2 is deprecated in Photon 4, use faillock instead
passwdLogin to the vCenter Server Appliance using the new root password.
sudo passwd rootNew password:Retype new password:passwd: password updated successfully Login to vCenter Server Appliance using the new root password.
sudo -iPassword:Connected to service
* List APIs: "help api list" * List Plugins: "help pi list" * Launch BASH: "shell"
Note: The root password can be set to never expire in order to prevent this issue by running command:
chage -I -1 -m 0 -M 99999 -E -1 root or at the VAMI ( https://<vcenter_fqdn>:5480)
If the issue persists, see Unable to log in to the vCenter Server Appliance shell using root account even after password reset
To update the password of the root user in the vCenter Server via appliance shell if account is not locked
localaccounts.user.password.update --username root --passwordMore information on Managing vCenter local user accounts: Managing Local User Accounts in vCenter Server.
Managing vCenter password policy: Change the Password and Password Expiration Settings of the Root User
Useful logs for troubleshooting re-lockouts:/var/log/audit/sshinfo.log