How To Enable Root Password for Single User Mode on vSphere 4
Posted by jlchannel - on June 11th, 2009 in Tips, vSphere | No Comments »

You can easily found “how to reset the root password on ESX” articles on the web for an example VMware KB article 1317898, xtravirt, or Petri.
However, unauthorized entry into single user mode is a risk. For security enhancement, you should enable password protect GRUB and enable root password for single user mode on vSphere 4.
How To Enable Root Password for Single User Mode on vSphere 4
- Login to vSphere server as root
- Edit /etc/inittab file
- # vi /etc/inittab
- Insert “~~:S:wait:/sbin/sulogin” and reboot
- You should be able to see password prompt during single user mode boot up

What is this mean?
man inittab shows
id:runlevels:action:process
id = is a unique sequence of 1-4 characters which identifies an entry in inittab
runlevels = lists the runlevels for which the specified action should be taken
action = describes which action should be taken.
process = specifies the process to be executed.
S = Single user mode
wait = The process will be started once when the specified runlevel is entered and init will wait for its termination.
Password protecting GRUB
Note: This may NOT really helpful to anyone of you because you’re require to enter password during boot up.
- Login to vSphere server as root
- Type: # /sbin/grub-md5-crypt
- Copy the encrypted password(e.g.$1$LgZD4/$vgg6d30on18oNlUB6FVew1) and paste into /boot/grub/grub.conf as example show below
- You’re prompt to enter GRUB password as you enter just now before server boot up
Related posts:
- VMware Data Recovery Mount Show Password Detail?
- Apply VMware vSphere 4 Update 1 Patches
- Participate in new version of vSphere Beta?
- ‘False’ Alarm Host connection failure
- Extending VMware vSphere 4 Enterprise Availability FAQ


