how can i restore a ROOT password for a VMWARE ESXi 4.1 host?

after initially logging into a host, i had to run the vsphere installer, and install the certificate
when vsphere loaded back up, im now unable to login to my ESXi 4.1 host, it seems the password is incorrect? has this happened to anyone before? is this a glitch? how can i change my root password? i see online that i can do this by going through the GRUB menu but, when i restart the ESX host, i dont have the grub menu appear!!!! please help!!!!
jsctechyInfrastructure Team LeadAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

1. Reboot the ESX host.
 2. When the GRUB screen appears, press the space bar to stop the server from automatically booting into VMware ESX.
3. Use the arrow keys to select Service Console only (troubleshooting mode).
4. Press the a key to modify the kernel arguments (boot options).
5. On the line presented, type a space followed by the word single.
6. Press Enter. The server continues to boot into single-user mode.
7. When presented with a bash prompt such as sh-2.05b#, type the command passwd and press Enter.
8. Follow the prompts to set a new root user password.
9.  When the password is changed successfully, reboot the host using the command reboot and allow VMware ESX to boot normally.
jsctechyInfrastructure Team LeadAuthor Commented:
ok, that pertains to ESX not ESXi, i dont get the GRUB menu when i restart the HOST... is there anyway to get this to show up?
Ahh I misread the version.  My apologies.  Take a look at this:
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.


 1.   First of all, you need to boot your ESXi server with a Linux live CD. I prefer GRML, but any live CD will do. Of course, you can also boot from a USB stick.
 2.   Find the partition containing a file named "state.tgz". For my installation, it was on a VFAT filesystem labelled "Hypervisor3", which is accessible in GRML at "/mnt/Hypervisor3". You might need to mount it manually with the command

    mount /mnt/Hypervisor3
 3.   Unpack the "state.tgz" file somewhere. It contains exactly one file, which is another archive named "local.tgz".

    cd /tmp
    tar xzf /mnt/Hypervisor3/state.tgz
4.    Unpack the "local.tgz", and find an "etc" directory containing several configuration files.

    tar xzf local.tgz

 5.   Edit the file etc/shadow to change the password.

    vi etc/shadow

6.    Probably the easiest way is to replace the line starting with "root" with the line of another user account of which you know the password. You only need to change the name at the beginning of the line (before the first colon) to "root". You've then set the root password to a password you know.
    Alternatively, you can just remove the hash altogether (everything between the first and the second colon) and login to the service console as root with no password at all.
7.    Re-pack the files and move the modified state.tgz back to the VFAT partition. Probably it is a good idea to make a backup copy of the original state.tgz in case something goes wrong:

    mv /mnt/Hypervisor3/state.tgz /mnt/Hypervisor3/state.tgz.bak
    rm local.tgz
    tar czf local.tgz etc
    tar czf state.tgz local.tgz
    mv state.tgz /mnt/Hypervisor3/
 8.   Reboot back into ESXi and you're done.
Maen Abu-TabanjehNetwork Administrator, Network ConsultantCommented:
VMware's official stance for pwd change for ESXi is a reinstall. It takes about 7mins (or less) to reinstall ESXi. And, it seems this is a fairly new install so no host configs needed to worry about.

@jordannet - that link is for ESX, not ESXi; different architectures.
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Yes, its happened to us, and also the password does not like certain characters!
Maen Abu-TabanjehNetwork Administrator, Network ConsultantCommented:
sorry i missed the i from ESX , however for esxi .. check this :
You've posted the same information a third time that two of us have posted twice already.
Maen Abu-TabanjehNetwork Administrator, Network ConsultantCommented:
Why you are angry?? ok Mr Author , ignore my link which is same of Mr. Persjwm and get here is alternative and simple way to change root password :-p..

Mr. Persjwm .. good afternon
Good afternoon to you as well, sir.
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
I think this one is easier to follow:-

Reset Root password on ESXi

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.