Resetar senha do root do Vmware ESXi

Lost your root password? Well, this is very unfortunate! This tutorial will show you how to reset ESXi root password.

You need a Linux Live or Rescue CD to perform this action. You can use RHEL/CentOS using the rescue mode, SysRescue CD, Knoppix or your favorite portable Linux distro.

1. Boot on your Live CD

2. Create two temp folders under /mnt :

3. Mount the dual root ESXi system partitions into the folders you just created :

Now, move in the first volume (sda5) :

4. Create a safety copy first of the file you are about to edit :

5. Untar state.tgz archive :

(This will extract local.tgz)

6. Untar local.tgz archive :

(This will extract ‘etc’ folder. You might get some outputs during the extraction about permissions, it’s safe to ignore.)

7. Edit ‘shadow’ file (this is the file where the user passwords are stored, encrypted of course) :

8. At the top line, you should see “root:” followed with alpha numeric characters, which is the encrypted password. Simply erase everything after ” : ” and enter the following :

This line will set the password to “recoverypassword”. You can also create your own by creating a new user on your rescue CD and paste the generated password.

9. Save and exit. Then repack the ‘etc’ folder :

And repack to ‘state.tgz’ :

10. Go back to ‘/mnt’ location and unmount the ‘sda5′ filesystem :

11. Repeat the exact same steps for ‘sda6′, then reboot.

  • 2 Usuários acharam útil
Esta resposta lhe foi útil?