Reset VMware ESXi Root Password

Source: Internet
Author: User
Tags unpack tmp folder root access gparted

Lost or forgot the root password of VMware ESXi host? Is there any recover or reset it? Just Like many Linux distributions, VMware ESXi also stores user account information, including one-way encrypted password s, in a file Called/etc/shadow. Just boot your server with a Linux Live CD and you can remove the root password easily.

This tutorial explains how to use Ubuntu Live CD to reset forgotten root password on VMware ESXi 5.5, so can log back into your ESXi server without reinstalling.

How to Reset VMware ESXi Root Password with Ubuntu Live CD?
  1. Boot your ESXi server from Ubuntu Live CD. After a while, the system installer would appear with the option to "Try Ubuntu" or "Install Ubuntu". Click on the "Try Ubuntu" to the load Ubuntu directly into RAM, without installing it on your.


  2. After getting to the Ubuntu desktop, click on the Ubuntu icon in the upper left corner and search forGParted in t He Dash. Double-click on GParted Partition Editor to launch it.


  3. Look at the partition layout of ESXi 5. The actual Hypervisor/system image is located on the first MB partition (/DEV/SDA5) which contains the state.tgz file.

  4. Now so we know that the partition which we need to mount Is/dev/sda5, close GParted and open the Terminal.


  5. In Terminal, type "sudo-s" to gain root access and then mount the ESXI system partition with the following commands. After mounting, you'll see the state.tgz file, which we need to unpack now.

    sudo -smount /dev/sda5 /mntcd /mntls 



  6. Copy State.tgz to The/tmp folder, and then unpack the State.tgz file which contains another compressed archive named LOCAL.TG Z.

    cp  state.tgz  /tmpcd  /tmptar xzf  state.tgzls 



  7. Unpack The local.tgz file which has the/etc directory compressed in it.

    tar  xzf  local.tgzls 



  8. Go to the/etc directory and your can gain access to the shadow file which contains the password hash of the ESXi root account.


  9. Run the VI Shadow command to open the shadow file in the VI editor. You'll find out that the password hashes of the root account are surrounded by the first and the colons. To remove the existing root password, you need to delete the password hash.


  10. Once You are removed the password hash, press ESC to return to the command mode. Type in  : Wq and press Enter. This would save your changes and exit the VI editor.


  11. Re-pack The files and copy the modified State.tgz file back to the ESXi system partition with the following commands:

    CD&NBSP, .... tar czf  local.tgz  etctar czf  state.tgz  local.tgzcp   state.tgz  /mnt/umount  /mnt 



  12. We ' re almost done! Just type reboot then remove the live CD and wait for ESXi server to restart. After a while, you'll get the following screen where you can configure the system by pressing F2.


  13. Just Keep the Password field blank and you can log to the root account.


  14. Please make sure this you set a new root password and store it confidentially. Do not lose it again.


Now you ' ve successfully reset lost root password on VMware ESXi host. The procedure is a bit complicated so carefully follow the instructions above. Enjoy it!


Reset VMware ESXi Root Password

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.