You are on page 1of 4

Reset Root Password on CentOS 5 & 6

 GENERAL LINUX

by Jim Kubicek on Jul 6, 2012 at 9:36am


Introduction
Booting straight up to GRUB is not the default boot method for CentOS 5 & 6.

This How-To was written to show you step by step the process of resetting the root password on your CentOS 5/6
installation.

Steps (7 total)
1

Boot or Reboot your CentOS installation

Expand
From the console ATL+CTRL+DEL will get you headed in the right direction.

Press Any Key


Expand
After the installation reboots, it will come up to a boot countdown. Here, you can press any key, I don't have one
either, but any other key works also.

This will bring you to the GRUB menu.

GRUB Menu

Expand
From the GRUB menu, select the appropriate kernel version and press the 'e' key.
You will now be presented with the option menu for the kernel version.

Kernel Options Menu


Expand
From this menu, select the kernel /vmlinuz-... line and press the 'e' key.
You will now be presented with the kernel boot options.

Change Kernel Boot Options

Expand
Now we need to add to the end of this line one o the following:
1, s, or single
And now press Enter to save your changes.

Boot your temporary options


Expand
From this menu, you should already be on the kernel /vmlinuz... line.
Press the 'b' key to boot to these temporary options to allow you to recover your root account.

Set Root Password

Now you will boot up to the root shell and you can use passwd to set your new password.
You will be required to enter the password twice.
Once you have completed this, reboot and you have a new root password for your CentOS installation.

You might also like