Thursday, May 19, 2016

Reset Root Password CentOS

Lost root Password

Log in using single-user mode then create a new root password.

To enter single-user mode, reboot your computer. If you use the default boot loader, GRUB, you can enter single user mode by following these steps:-
  • At the boot loader menu, use the arrow keys to highlight the installation you want to edit and type [A] to enter into append mode.
The looks similar to the following:
grub append> ro root=LABEL=/
  • Press the Space bar once , then add the word single to tell GRUB to boot into single-user mode. The result should look like the following:
grub append> ro root=LABEL=/ single
  • Then Press [Enter] and GRUB will boot as a single-user mode.
After that, the look with a shell prompt similar to the following:
sh-2.05b#
Now you can change the root password by typing:
sh-2.05b# passwd root
Type your password, re-type it, then press enter.

The password is changed ...

After reboot you can log in into root user.

Keep Enjoying ...!


0 comments: