Chris Hall bio photo

Chris Hall

Adjusting technology to make it fit my requirements...

Windows, Linux, Virtualisation, Unified Computing & Cloud Offerings Design Engineer.

PolarCloudsUK Chris Google+ LinkedIn Github
It happens to us all eventually.

Just like anything else, appointments, meetings, conference calls, you name it, wedding anniversaries (especially wedding anniversaries) at some point you are going to forget a password or two.

All well and good, most passwords can easily be reset without any real problem.  After all what good is a password system that doesn't allow for this oh so regular occurrence?

But what happens if you forget the root password to one or more of your VMware ESX servers?  Hmm that's not so easy to sort out.  Or is it?

Yes it's easy to reset, but you are going to need an outage.

How To Reset root Password
  1. Shutdown or migrate all Virtual Machines off of the ESX server in question
  2. Reboot ESX server and at the grub boot menu screen press a to modify the kernel arguments:
  3. At the following screen, enter the word single at the end of the kernel arguments line:
  4. Hit Enter.  The ESX server will now boot into a single user environment:
  5. At the # prompt enter passwd This will prompt you to enter a new password for the root user:
  6. Once you have entered your new root password, reboot the ESX server with the reboot command:
  7. Allow the ESX server to reboot as normal.  Double check your new root user password works as expected, bring up any shut down Virtual Machines.
Job Done!

Although I have used ESX 3.5 in the screenshots, this procedure also works for ESX 4.

Isn't this a "back door" into ESX?  Is this procedure really a legitimate way to reset root passwords?  No, it's not a back door!  Honest Guv'nor!

As for legitimacy, see this VMware knowledgebase article

Thanks go to Martin for calling this afternoon and asking how this is done - before you called I always wondered...  Now we know!

- Chris