How to reset CentOS root password

This method will use GRUB loader to boot the Linux kernel in single user mode in order to change the root password.

1. Boot up your Linux box and press any key to enter GRUB menu:

2. Select your current kernel version in case you have several and press ‘e’ to enter edit mode:

3. Position the cursor on the line starting with “kernel” and press ‘e’ again to edit the boot parameters. Then add the parameter ‘single at the end of the line as follows:

This will boot CentOS in single-user mode. Press ENTER to accept your changes.

4. Finally, press ‘b’ to boot the system up. You will get a root console so you can change the password with:

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s