How to Reset root password for ESX

1.0 Introduction
This post provides information on how to reset the Root password in VMware ESX 4.
Without the root password it is impossible to carry out certain tasks. Even logged on with a non-root account, without knowing it you won’t be able to elevate privileges and adequately manage the server.
2.0 Pre-Requisites
If the ESX server is part of a cluster, vMotion your VM’s off the host then power down the ESX host. If the ESX server is standalone, power off running VM’s and then shut down the ESX host.
Access to the physical ESX server console – a remote network session cannot be used.
3.0 Resolution – Resetting the Root password
A lost root password cannot be recovered, but as outlined in the procedure below, it can be reset.
1.       Power on the ESX server. At the Grub boot loader, select the “VMware ESX 4.0” entry and press a to modify the kernel argument

2.       The default kernel options for the “VMware ESX 4.0” entry will be displayed.
3.       Add a space and the word single to the end of the list of arguments and press Enter. (Note that the first few arguments will scroll off the left hand side of the console.)
4.       ESX will boot to single user mode. This may take a minute or so and when complete, a sh-32.# prompt will appear.
5.       At the prompt, type the command passwd and press Enter. Follow the prompts and enter the required new root password twice. A successful password change will result in the display of a “passwd: all authentication tokens updated successfully” message.
6.       Enter the command reboot and press Enter. ESX will boot normally.
7.       When ESX has finished booting, switch to the ESX console by pressing Alt-F1 and confirm the new password has taken affect by logging on as root.

One thought on “How to Reset root password for ESX

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: