How to Reset CentOS root Password

For those who are forgot their CentOS root password, please do not panic. There was the easy way to reset the root password for CentOS. Please follow this steps and you will be able to access your CentOS.

1. Reboot the CentOS machine
2. When booting up, press any key to go into the select menu.
3. The press ‘e’ to navigate to second grub.conf line (kernel)
4. Once again press ‘e’ to edit the line and you can select one step from these option :

  • option 1 : 1 (‘1’) at the end of the line. OR
  • option 2: S (‘S’) a the end of the line OR
  • option 3: add ‘single’ to “ro root=LABEL=/ single”
READ  How to Install 389 Directory Server on CentOS/RHEL

5. After edit, hit “ENTER
6. Press ‘b’ to reboot
7. After reboot it will stop at ‘#’ command line.
8. At ‘#’ command line, type ‘passwd’ to create new password.
9. Reboot machine as usual
10 Finish

Leave a Reply

Your email address will not be published. Required fields are marked *

SiteGround.com

A world leading hosting company that provides fully-managed innovative and secure solutions, suitable for hosting small to medium-sized websites

Built on the best available technologies combined with Google Cloud for strong redundancy and application availability. Backed by skilled experts to address web security threats, a devops team to create advanced custom security solutions, and 24/7 sysadmins to watch over the platform. This powerful, hands-on approach makes your sites faster, safer, and easier to manage. Starting from only $3.95/mo.

TRY FREE

* up to 30 days money back guarantee