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.

reset-zaboravljene-lozinke-na-vmware-esxi-01

Put your Linux Mint in DVD drive and boot it in live mode.

reset-zaboravljene-lozinke-na-vmware-esxi-02

Try to find and mount partition where are VMware modules – they have extensions v00, v01, v02, v02…

reset-zaboravljene-lozinke-na-vmware-esxi-03

Find file state.tgz and copy it to somewhere, for example – to Desktop

reset-zaboravljene-lozinke-na-vmware-esxi-04

Make a backup of original state.tgz for any case – just rename it to something like BACKUP_state.OLD

reset-zaboravljene-lozinke-na-vmware-esxi-05

Open terminal, and do a extract of state.tgz and local.tgz (it will be under state.tgz archive).

reset-zaboravljene-lozinke-na-vmware-esxi-06

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…

reset-zaboravljene-lozinke-na-vmware-esxi-07

…so file shadow will look like this…

reset-zaboravljene-lozinke-na-vmware-esxi-08

Save shadow file, and to a reverse actions – create local.tgz from folder etc, and state.tgz from that local.tgz

reset-zaboravljene-lozinke-na-vmware-esxi-09

Now copy newly created state.tgz to original destination

reset-zaboravljene-lozinke-na-vmware-esxi-10

Restart machine, eject Linux Live so you can try to login to VMware ESXi again

reset-zaboravljene-lozinke-na-vmware-esxi-11

Root password is empty so just press ENTER button on login screen

reset-zaboravljene-lozinke-na-vmware-esxi-12

After successfully login – please create new root password.reset-zaboravljene-lozinke-na-vmware-esxi-13

reset-zaboravljene-lozinke-na-vmware-esxi-14

reset-zaboravljene-lozinke-na-vmware-esxi-15

Congratulations – now you can use VMware as before, with new root password.
(Serbian version of this manual you can find here)