---
title: 'Reset password in VMware ESXi 6 | Zomro'
description: 'Article describes how to reset a lost root password to VMware ESXi 6 | Zomro'
image: 'https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a52%40server-panel.net/2023/05/15/screenshot_0.jpg'
---

![opened image]()

  * [Zomro](https://zomro.com/)
  * [FAQ](https://zomro.com/blog/faq/)
  * Reset password in VMware ESXi 6 



# Reset password in VMware ESXi 6

15-05-2023

If you want to change the password for the root user to the VMware ESXi panel, then this can be done in several ways.

For example, if you know the current password, you can simply change it in the ESXi control panel itself,

and if you forgot the password, but you have the vCenter control panel available, then the password for this host can be changed in the vCenter web panel.

In earlier versions (before 4.x) it was possible to change the password through the GRUB bootloader.

## 

## **Change the password**

## 

This is all clear, but what if you have installed only standalone VMware ESXi hypervisor on a dedicated server and you forgot the password for the root user?

After all, without the ability to log into the control panel as a superuser,

you lose the ability to manage your virtual machines, disks, network and everything else, and at current moment, VMware, strangely enough, does not offer password recovery tools in this situation.

On the official VMware forums is written that in this case, you need to reinstall the server and hypervisor,

which will wipe out all the data on it. That is clearly not an ideal solution.

Fortunately, we can use the "hack" that I will show below, such operation can be quite dangerous, so do this operation at your own risk.

Also note that to perform the operation, you will need to shut down the server, which will stop all machines and services on it for the period of doing changes.

This solution is suitable for **ESXi versions 5-6** and probably for 7-8 too, I will be using version 6.7 in this example.

  


**1.** First you will need to connect the LiveCD ISO to a dedicated server.

I am attaching detailed guide on how to connect your ISO image to a dedicated server.

<https://zomro.com/blog/faq/234-kak-podkljuchit-svoj-obraz-iso-k-vydelennomu-serveru>

  


I will be using **SystemRescueCD** which can be downloaded from here:

<https://www.system-rescue.org/Download/>

**2.** Now we need to find the file on the server's disk that stores the password for the root user.

After the disk is connected, the server is rebooted and booted from the LiveCD, you need to enter the console or terminal, depending on your choice of LiveCD.

In SystemRescueCD I chose the first option **Boot SystemRescueCD with default options**

after which, after a while, the console has been loaded, in which we can enter commands.

![Reset password in VMware ESXi 6 - 1](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a52%40server-panel.net/2023/05/15/screenshot_0.jpg)

  


**3.** You need to find the partition on which the hypervisor configuration and boot modules are stored, for this we enter the command:
    
    
    lsblk -lp

You should see a similar picture as in the screenshot below:

![Reset password in VMware ESXi 6 - 2](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a52%40server-panel.net/2023/05/15/screenshot_1.jpg)

Such partition is **/dev/sda5** (Boot-bank 0)

You can read more about the hypervisor's system storage layout here:

<https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.esxi.install.doc/GUID-474D003B-C6FB-465D-BC1B-5FD30F8E2209.html>

  


**4.** Let's mount this partition to the **/mnt** folder of our LiveCD with the command:
    
    
    mount /dev/sda5 /mnt

**5.** Check if the **state.tgz** file exists:
    
    
    ls /mnt/state.tgz

Should show that such file is found:

![Reset password in VMware ESXi 6 - 3](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a52%40server-panel.net/2023/05/15/screenshot_2.jpg)

Now let's create a temporary folder where we will unpack and edit the file.
    
    
    mkdir /new

Go to the newly created folder:
    
    
    cd /new

Unpack the archive into it:
    
    
    tar -xf /mnt/state.tgz -C /new/

Now another archive should appear in the **/new** folder, let's unpack it too:
    
    
    tar -xf local.tgz

If everything is done correctly, then the folder should contain the **etc** folder and the **local.tgz** archive, as in the screenshot below:

![Reset password in VMware ESXi 6 - 4](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a52%40server-panel.net/2023/05/15/screenshot_3.jpg)

We no longer need the **local.tgz** archive, delete it:
    
    
    rm local.tgz

**6.** Now look for the **shadow** file in the **etc** folder and open it with the **vim** text editor:
    
    
    vi etc/shadow

On how to use the **vim** text editor, we have a nice article here:

<https://zomro.com/blog/faq/204-redaktor-vim>

  


Inside the file, there should be something like in the screenshot below. As you can see, there is a long strange gibberish in the row of root user,

this is our password, it looks like this because it is stored in encrypted form.

![Reset password in VMware ESXi 6 - 5](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a52%40server-panel.net/2023/05/15/screenshot_4.jpg)

We can remove this hash code (everything between the first 2 semicolons), which will cause the root user to have no password, resulting in the following:

![Reset password in VMware ESXi 6 - 6](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a52%40server-panel.net/2023/05/15/screenshot_5.jpg)

If you do not want to leave the input without a password, then you can, for example, we can replace this hash with another

**$6$q6uSw7nb/XO9hwSx$VDecNPTdNHdgDIKnVEMZggB0ooLzjWX22IuCAPkr06tVELOHdCiHsh.MjpSxmxqC7XTHUl4bOWTv5cPNZ0cxi0**

This is how encrypted password **1234VMesxi** looks.

Then we save the file (in the **vim** editor enter **:wq**)

  


**7.** Now we need to repack it all and return the archive to where we got it from, run the following commands one by one:
    
    
    cd /new
    
    tar -czf local.tgz etc
    
    tar -czf state.tgz local.tgz
    
    mv state.tgz /mnt/
    
    chmod 755 /mnt/state.tgz

**8.** Unmount the disk **/dev/sda5** now.
    
    
    umount /mnt

**9.** Reboot the system, disconnect the LiveCD from the server and boot from the server's disk.
    
    
    reboot

**10.** When entering the ESXi panel via the console, press the **F2** button and now it should start up without a password, if you previously deleted the hash in the file.

If you replaced the password with the hash that is written above, then you need to enter this password: **1234VMesxi**

![Reset password in VMware ESXi 6 - 7](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a52%40server-panel.net/2023/05/15/screenshot_6.jpg)

  


Next, **MAKE SURE to change the password to a new one** , for this we select the **Configure Password** option:

![Reset password in VMware ESXi 6 - 8](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a52%40server-panel.net/2023/05/15/screenshot_7.jpg)

Leave the **Old Password** field empty or enter the password **1234VMesxi** , depending on what was done earlier and then enter the new password 2 times:

![Reset password in VMware ESXi 6 - 9](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a52%40server-panel.net/2023/05/15/screenshot_8.jpg)

The password has been successfully changed to a new one and now you can enter the panel using a web browser.

![Reset password in VMware ESXi 6 - 10](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a52%40server-panel.net/2023/05/15/screenshot_9.jpg)

We also suggest you other useful articles:

  * [Password reset on Windows Server 2016 - 2012](https://zomro.com/blog/faq/149-sbros-parolja-na-windows-server-2012-2016)
  * [How to change the SSH connection port and disable password authorization](https://zomro.com/blog/faq/236-kak-izmenit-port-podkljuchenija-po-ssh-i-otkljuchit-avtorizaciju-po-parolju)



Similar articles:

[How to login to linux server via ssh](https://zomro.com/blog/faq/218-kak-vojti-na-linux-server-po-ssh) [How to order a dedicated server in the new billing](https://zomro.com/blog/faq/230-kak-zakazat-vydelennyj-server-v-novom-billinge) [How to enable sound on VPS with Windows Server 2012, 2016, 2019](https://zomro.com/blog/faq/269-kak-vkljuchit-zvuk-na-vps-s-windows-server-2012-2016-2019) [How to trace](https://zomro.com/blog/faq/331-kak-proizvesti-trassirovku) [Enabling HTTP2 in ISPmanager](https://zomro.com/blog/faq/202-vkljuchenie-http2-v-ispmanager)

[ Dedicated servers from €88.80/mon ](/dedicated-servers)
