Resetting the VMware ESXi administrator password
This is the old case from far past (around late 2021). ;-)
Get Piotr Bracha’s stories in your inbox
Join Medium for free to get updates from this writer.
To even begin resetting your password, you need to prepare a bootable USB drive with Ubuntu Desktop. At the time of writing this guide, the latest version is 20.10, but if you plan to install it somewhere later, it is better to choose a version with long-term support, i.e., 20.04.1 LTS. After downloading the image, install it on a USB drive using Rufus.
- Boot the machine from the USB drive created above and select the Try Ubuntu option.
- After launching the desktop, type gparted in the application search engine, and then run the program.
- The program displays the current list of partitions. Two of them will be approximately 250MB in size. In my case, these were /dev/sda5 and /dev/sda6, and the hypervisor / system image is on the first one.
- Launch the terminal and execute a series of commands that can be used by copying and pasting:
sudo -s
mount /dev/sda5 /mnt
cd /mnt
ls
cp state.tgz /tmp
cd /tmp
tar xzf state.tgz
ls
tar xzf local.tgz
ls
cd etc
nano shadow
---->>At this point, the shadow file is open for editing. Delete the hash between the first and second colons. Exit the file and save the changes.
cd ..
tar czf local.tgz etc
tar czf state.tgz local.tgz
cp state.tgz /mnt/
umount /mnt
reboot
---->>Remove the USB flash drive and wait for ESXi to start up.Disclaimer
- Reset performed on VMware ESXi version 6.7.0.
- In my case, after deleting the password, I still could not log in to the console from the hypervisor machine, despite entering my username and leaving the password field blank.
- I managed to log in to the hypervisor panel from the browser and set a secure password. After logging in to the panel and rebooting the machine, the set password also started working in the console.








