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!!!!
LVL 1
jsctechyAsked:
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
0
 
PERSJWMCommented:
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.
0
 
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?
0
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!

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

http://www.bock.nu/blog/reset-root-password-vmware-esxi-4.1
0
 
netballiCommented:
Hello,

 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.
0
 
Maen Abu-TabanjehNetwork Administrator, Network ConsultantCommented:
0
 
coolsport00Commented:
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.

~coolsport00
0
 
coolsport00Commented:
@jordannet - that link is for ESX, not ESXi; different architectures.
0
 
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!
0
 
Maen Abu-TabanjehNetwork Administrator, Network ConsultantCommented:
sorry i missed the i from ESX , however for esxi .. check this :

http://www.bock.nu/blog/reset-root-password-vmware-esxi-4.1
0
 
PERSJWMCommented:
You've posted the same information a third time that two of us have posted twice already.
0
 
Maen Abu-TabanjehNetwork Administrator, Network ConsultantCommented:
@PERSJWM:
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..

http://www.ntpro.nl/blog/archives/1677-An-alternative-way-for-ChangingResetting-an-ESXi-4.1-root-password.html

Mr. Persjwm .. good afternon
0
 
PERSJWMCommented:
Good afternoon to you as well, sir.
0
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.