Wednesday, 22 July 2015

Forgot Rootpassword / How to Reset Root Password

In this post will guide you simple steps to reset forgotten root password in RHEL, CentOS and Fedora Linux with example. There are various ways to reset root password which are.
  1. Booting into single user mode.
  2. Using boot disk and edit passwd file.
  3. Mount drive to another system and change passwd file.
 STEP 1. Boot Computer and Interrupt while booting at GRUB stage hitting   ‘arrow‘ keys or “space bar“.

 STEP 2. Type ‘a‘ to modify kernel argument. Anytime you can cancel typing ‘ESC‘ key.

 STEP 3. Append 1 at the end of “rhgb quiet” and press “Enter” key to boot into single user mode.

 STEP 4. Type command “runlevel” to know the the runlevel  

 STEP 5. Type ‘passwd‘ command without username and press ‘Enter‘ key in command prompt. It’ll ask to supply new root password and re-type the same password for confirmation. “Your are Done” Congratulation!!!where you are standing. Here “1 S” state that your are in a single user mode.

No comments:

Post a Comment