Here is manual how you can reset forgotten root password on VMware ESXi, without reinstall of whole system and other shit. Reset will require rebooting of server so please before any action backup everything important from VM’s in VMware ESXi and do a regular shutdown of services and virtual machines over ssh/RDP or other remote administration tool which you are using there.
For this article we will reset root password with Linux Mint 17 but you can use any Linux distribution with live boot option as Ubuntu, Knoppix and others. For this manual, VMware ESXi is installed as virtual machine under VMware player and I didn’t try this (jet) on production servers.
Put your Linux Mint in DVD drive and boot it in live mode.
Try to find and mount partition where are VMware modules – they have extensions v00, v01, v02, v02…
Find file state.tgz and copy it to somewhere, for example – to Desktop
Make a backup of original state.tgz for any case – just rename it to something like BACKUP_state.OLD
Open terminal, and do a extract of state.tgz and local.tgz (it will be under state.tgz archive).
After extracting of local.tgz you will find folder etc and file shadow inside – please open that file with some text editor, like vi, nano, gedit and delete anything in root line between two first “:” characters. Example of text which you need to delete you can see on next screenshot…
…so file shadow will look like this…
Save shadow file, and to a reverse actions – create local.tgz from folder etc, and state.tgz from that local.tgz
Now copy newly created state.tgz to original destination
Restart machine, eject Linux Live so you can try to login to VMware ESXi again
Root password is empty so just press ENTER button on login screen
After successfully login – please create new root password.
Congratulations – now you can use VMware as before, with new root password.