Skip to content
- Boot the server up with a linux disc, such as CentOS 7 in recovery mode
- Once booted, mount 250MB partition. Usually /dev/sda5.
mount /dev/sda5 /mnt - cd to /mnt
- Copy state.tgz to /tmp
cp state.tgz /tmp - cd to /tmp, then extract state.tgz.
cd /tmp; tar -zxvf state.tgz - Extract local.tgz.
tar -zxvf local.tgz - Open the /tmp/etc/shadow file using your favorite text editor.
nano /tmp/etc/shadow - Under your root (or account with root), remove the shadow password. The resulting row may look like this.
root::13358:0:99999:7::: - Now repack all the files back in.
cd /tmp; tar -zcvf local.tgz etc; tar -zcvf state.tgz local.tgz - Copy the state.tgz back into /mnt.
cp /tmp/state.tgz /mnt; - Now reboot the server. Once ESXi is booted back online, you will be able to log into your root with a blank password.