Reset PASSWORD in CentOS

Let us assume a scenario, you are coming back after holiday, and generally it happens that you don't remember your system password. Now, what to do. Don't worry here are the steps which will help you in resetting the password.

Reset Password in CentOS, Fedora, RHEL

Lets get started with the process.

  1. Boot your system again. And the moment you see the screen with timer running, press any key except enter key to stop the times and select manually from the list of operating systems.
  2. Select the Linux for which you need to reset password by press up or down arrow key.
  3. Once you selected desired Linux, press e to edit the command before booting.
  4. On next screen select kernel and again press e to edit the command in boot sequence.
  5. By adding space '1', we are passing an argument to boot in run level one.
  6. Keeping the kernel selected press 'b' to boot the system with modified commands.

Linux will boot in run level 1 with root user logged in. From here we can change password of root user or any other user. Change the password using passwd command. Enter the new password. Retype the password. And reboot the system with default sequence. Once the system is ready to login, use the new credentials to log in.

Linux For Beginners

Linux For Beginners