Prepare a CentOS6 installation disk (any version), or prepare an installation disk for another Linux, with CentOS6 as an example.
This article has been practiced to successfully retrieve the password on the Dell R720 server after the test was successful in the Windows virtual machine.
This tutorial is intended for both Esxi5.5 and Esxi6.5 versions, two versions have been attempted successfully, and the remaining versions are attempted.
First burn a CentOS6 startup disc or USB flash drive and modify the server's startup item to a USB flash drive
The server will boot from the USB flash drive after booting, and then follow the diagram to select it:
As shown in the illustration, the pictures in this article come from a virtual machine, and the display on the server may be slightly different, but the final choice must be consistent
Now that you have entered the CentOS rescue mode and will begin to retrieve the password for VMware ESXi, follow these commands
Mkdir/mnt/sda5
Mount/dev/sda5/mnt/sda5
Cp/mnt/sda5/state.tgz/tmp
Cd/tmp
Tar XF state.tgz (This step will generate a local.tgz file after extracting the file)
Tar XF local.tgz (at the end of this step, there will be a etc directory under TMP)
VI Etc/shadow (remember, in rescue mode can only use VI, and do not press A or I key into the editing mode, directly using X to delete the text)
Please delete the contents according to the two red box tags, notice the colon (mainly the contents of the middle of the first colon and the second colon, the final result should be as shown in the figure below
Rm/tmp/state.tgz/tmp/local.tgz
Tar czf local.tgz etc/
Tar czf state.tgz local.tgz
CP state.tgz/mnt/sda5/
Unplug the USB flash drive to restart the server, after VMware ESXi fully started, press F2, prompt for password to enter directly, and then reset the password, but pay attention to meet the password complexity requirements