VMware Cloud Community
chavez9119
Contributor
Contributor
Jump to solution

Reset lost root password

Is it possible to reset a lost root password if you have enabled passwords to get into single user mode?

0 Kudos
1 Solution

Accepted Solutions
DSTAVERT
Immortal
Immortal
Jump to solution

Any linux distribution disk should work to start the host server. There is usually a RESCUE start option. http://www.sysresccd.org/Main_Page is also a good disk to have on hand. Save it to the datastore as well for other maintenance tasks once you are back and running.

-- David -- VMware Communities Moderator

View solution in original post

0 Kudos
22 Replies
DSTAVERT
Immortal
Immortal
Jump to solution

http://www.vm-help.com/esx/esx3i/Reset_root_password.php

-- David -- VMware Communities Moderator
0 Kudos
DSTAVERT
Immortal
Immortal
Jump to solution

Any linux distribution disk should work to start the host server. There is usually a RESCUE start option. http://www.sysresccd.org/Main_Page is also a good disk to have on hand. Save it to the datastore as well for other maintenance tasks once you are back and running.

-- David -- VMware Communities Moderator
0 Kudos
chavez9119
Contributor
Contributor
Jump to solution

will this work for ESX 3.5? are you saying that i can just boot any "resue" cd, find the /etc/shadow file and edit the password field to blank?

0 Kudos
chavez9119
Contributor
Contributor
Jump to solution

Troy, I can't use that method because I enabled root password for single user mode by adding ~~:S:wait:/sbin/sulogin to inittab

0 Kudos
DSTAVERT
Immortal
Immortal
Jump to solution

Troy

Just watch. We're bending the coat hanger for the guy and find out later he was stealing the car. Smiley Wink

-- David -- VMware Communities Moderator
0 Kudos
Troy_Clavell
Immortal
Immortal
Jump to solution

Disclaimer:

We claim no responsibility for any actions taken based upon our recommendations!

How's that? Smiley Happy

0 Kudos
DSTAVERT
Immortal
Immortal
Jump to solution

And I'll be your witness.

-- David -- VMware Communities Moderator
0 Kudos
DSTAVERT
Immortal
Immortal
Jump to solution

You need to follow the directions in the link. You will need to create two mount points and then mount the two fat partitions /dev/sda5 and /dev/sda6 . Copy off the state.tgz or local.tgz file depending on whether you have embedded or installed ESXi. Untar the file. enter the etc folder and blank the root password field in shadow. I can confirm that it works. I just did it.

-- David -- VMware Communities Moderator
0 Kudos
Troy_Clavell
Immortal
Immortal
Jump to solution

based on this statement:

will this work for ESX 3.5?

Is OP using ESXi or Classic ESX?

0 Kudos
chavez9119
Contributor
Contributor
Jump to solution

Thanks for testing. I am not using ESXi, I got classic ESX. I am going to download that slax cd and give it a try.

0 Kudos
Troy_Clavell
Immortal
Immortal
Jump to solution

keep this handy too, it's the official guide

http://kb.vmware.com/kb/1317898

0 Kudos
chavez9119
Contributor
Contributor
Jump to solution

thanks troy. I had tried that kb before posting. The issue is that i configured single user mode to require the root password. I never get to the bash prompt.

0 Kudos
DSTAVERT
Immortal
Immortal
Jump to solution

ESXi forum. Sorry I missed the ESX

-- David -- VMware Communities Moderator
0 Kudos
DSTAVERT
Immortal
Immortal
Jump to solution

You may be able to use the ESX install CD to do the rescue boot.

-- David -- VMware Communities Moderator
0 Kudos
DSTAVERT
Immortal
Immortal
Jump to solution

I just downloaded ESX to try. I will try kon-boot when I get it installed. kon-boot is worth it's own discussion,

-- David -- VMware Communities Moderator
0 Kudos
DSTAVERT
Immortal
Immortal
Jump to solution

Troy

Have you perchance tried kon-boot against ESX?

-- David -- VMware Communities Moderator
0 Kudos
Troy_Clavell
Immortal
Immortal
Jump to solution

nope, never tried kon-boot

0 Kudos
DSTAVERT
Immortal
Immortal
Jump to solution

If you aren't aware of it have a look. It allows you to boot straight into many/most linux distros or all Windows versions without knowing the password. Doesn't work with ESXi. It is a tiny CD or floppy image. It is worth knowing about for it's usefulness and it as a security threat.

-- David -- VMware Communities Moderator
0 Kudos