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!!!!
Who is Participating?
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
I think this one is easier to follow:-

Reset Root password on ESXi
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.
jsctechyAuthor 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?
Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

Ahh I misread the version.  My apologies.  Take a look at this:

 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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.