VMware ESXi forgot root password

Source: Internet
Author: User
Tags prepare

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.