How to reset root password of vCenter Server 6.5 – VCSA

There might a situation when you can’t login into a vCenter system anymore because you either don’t know the root password anymore or the system is not able to log you in.The can happen if the root mountpoint of the VCSA 6.5 appliance filled up or forgotten the root password .

New VCSA (vCenter Server Appliance) 6.5 is build on top of Photon OS and this will not allow you to change the password by using the same standard procedure you know from Debian, Ubuntu or RedHat.

In such cases ,  Follow below procedure to reset the password
  • Restart your vCenter appliance and wait for the Photon OS Splash screen during boot.

  • Once booted hit the letter to enter the boot menu.
  • Change to the GNU GRUB boot menu editor and hit enter.

  • Add the following string behind the line that starts with linuxrw init=/bin/bash

  • Hit the F10 function key to boot the changed entry.

How to clean up the root partition

Check the root partition usage, using the df -h command. Very often the log files grew large and filled up your partition.

check the usage of  audit.log in /var/log/audit by follwoing commad

ls -sh /var/log/audit

To remove the file follow this

rm /var/log/audit/*.log to clean it up.

How to reset the root password

Please follow these steps:

passwd 

Enter a strong password twice and make sure you will remember same for future

umount /

reboot -f