Reset / Recovery Root Password VMWare ESXi 6.0

Dec 22, 2016 4:24 PM

Forgot your ESXi root password? don't worry. Here are a simply way to recover / reset you ESXi 6.0 root password. But, you must have physical access to the device.

Requirement :
a. Linux live cd/dvd
b. Text editor


Recovery way :
1. Boot your linux live 
2. Check internal disk partitions where ESXi installed :
# fdisk -l

3. Find the /dev/sdx5 and /dev/sdx6, we want to find a file "state.tgz". Normally this file stored in /dev/sdx5 or /dev/sdx6
--> /dev/sdx - x means disk on you device

4. You will mount /dev/sdx5 and /dev/sdx6 to directory, create a mounted directory 
# mkdir /5
# mkdir /6

5. Mount /dev/sdx5 and /dev/sdx6 to the newly created directory
# mount /dev/sdx5 /5
# mount /dev/sdx6 /6

6. Check the state.tgz file :
# ls /5/state.tgz || ls /6/state.tgz

7. We found the state.tgz in /5 directory. Backup the original file and copy to local directory.
# cp /5/state.tgz /5/state.tgz.original
# cp /5/state.tgz ~/

8. Find file etc/shadow from the state.tgz file. So extract the file :
# gzip -d state.tgz
# tar -xvf state.tar
# gzip -d local.tgz
# tar -xvf local.tar
# cd etc
# vi shadow

** Remove the encription text  and save it

9. Tar and zip these directory

# tar -czvf local.tgz etc
# tar -czvf state.tgz local.tgz
# cp state.tgz /5/state.tgz
# umount /5
# umount /6

10. Reboot the server 
# reboot

11. After ESXi boot finish, press F2. When appear user and password prompt, press . Then setup the new password.

/* Suwardi */ 

0 comments:

Article list :