I recently had the case, that the VCSA (vCenter Server Appliance) root password was missing and we couldn’t log in to the appliance. VMware published a Knowledge Base article on how to reset the lost or forgotten password in a vCenter Server Appliance. I wanted to share this with you as this is a very easy process and there is no need for panic 🙂
How to reset the lost or forgotten root password in vCenter Server Appliance 6.5 (2147144)
First of all, please take a snapshot or a backup of your vCenter Server Appliance virtual machine. This is mandatory and shouldn’t be forgotten !
Resetting the root password
After you took a backup of your vCenter Server Appliance, reboot it and press the “e” key while the appliance is booting. You should land in the GNU GRUB Edit Menu then.
If you are in, you should add the following to the line which begins with “linux”.
Here is a screenshot on how to set the line.
After you edited the line, you can press F10 to continue the boot process.
As you can see, the appliance booted into the Photon OS as the root user. You are now able to set the password with the linux “passwd” command.
After this step you have successfully reset the root password of your vCenter Server Appliance.
The next step is to unmount the filesystem and reboot the appliance.
After unmounting reboot the appliance with:
After the appliance has booted, you can try to access the root account with your newly created (reset) password, which worked perfectly in my case.
As you can see, there is no need for panic, because it is fairly easy to reset a lost or forgotten password. Thanks for reading and have a nice day !
Update: 06.12.2018 GRUB password could prevent booting
My fellow Christoph Villnow gave me a hint, that he was facing similar issues regarding this topic. He couldn’t reset the root password as provided in my article. This was because the GRUB password is, when not defined, the same as the root password. He wrote an informational article about this problem, where he linked the solution from Lingeshwaran Rangasamys (https://unixarena.com) article.
VMware says the following
If the vCenter Server appliance is deployed without editing the root password in the Virtual Appliance Management Interface (VAMI), the default GRUB password is “vmware”.
If the vCenter Server appliance root password is reset using the VAMI, the GRUB password is the password last set in the VAMI for the root account.
If you experience this case, you have to “break” / reset the GRUB password as described in this article. http://www.unixarena.com/2016/04/reset-grub-root-password-vcsa-6-0.html/
Thanks for the hint and for this awesome article on how to reset the GRUB password !
thank you….help me a lot