Home > Uncategorized > reset root password on Red Hat/Fedora/CentOS

reset root password on Red Hat/Fedora/CentOS

Okay, so you’ve screwed the pooch and need to reset the password for root on your Red Hat/Fedora/CentOS installation.  Assuming that it is a default installation, without hardening, this can be done fairly easily.

This assumes you have GRUB installed.

  1. When the GRUB login screen comes up, hit “e” to edit.
  2. Move the cursor down to the kernel line and hit “e” again.
  3. At the end of the kernel line, add a space and the word “single.”  This will force the reboot into single user mode.  Continue booting the server.  You will automagically be logged in as root.
  4. Run the passwd command to reset root’s password.
  5. Reboot as normal.
Advertisements
Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: