Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

7 Easy Steps to Reset Forgotten Root Password on CentOS/Red Hat

DZone's Guide to

7 Easy Steps to Reset Forgotten Root Password on CentOS/Red Hat

Forgot your root password on CentOS/Red Hat? Here's how to reset it.

· Web Dev Zone ·
Free Resource

Learn how error monitoring with Sentry closes the gap between the product team and your customers. With Sentry, you can focus on what you do best: building and scaling software that makes your users’ lives better.

1. Boot the system and when you see the following message "Press any key to enter the menu", press any key. (You will see the list of available kernel versions.)


2. Press e in order to edit commands before booting.


3. Highlight the list item with vmlinuz in it by using the arrow keys and press e.


4. Now type single or init 1 at the end of the line.


5. Then press enter and b to boot the system with the new argument. (The system will boot into single user mode and you will see bash prompt)


Now it's time to change the password:


6. Type passwd

### Shell Commands ###
passwd
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

7. Type reboot to restart the system.

What’s the best way to boost the efficiency of your product team and ship with confidence? Check out this ebook to learn how Sentry's real-time error monitoring helps developers stay in their workflow to fix bugs before the user even knows there’s a problem.

Topics:
java ,red hat ,linux ,centos ,root password

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}