How to reset ROOT password in RHEL/CentOS

Hello Linux-Fanatics, this tutorial is about resetting forgotten ROOT password. We all must have faced a situation where we or some other user has forgotten his root password, so how do we reset the password. This is also a question we have to solve while appearing for our RHCSA certifications.

Well, the process to reset the root password is quite simple. So, let’s get started,

Resetting ROOT password

Firstly , reboot your system & when the kernel selection screen comes, press ‘e’ to edit kernel parameter

resetting root password

Next, search for the line starting with “linux16” and move to the end of that line by pressing “end ” key of keyboard. Type ‘rd.break’ without quotes at the end of the line & press “CTRL + X

resetting root password

Now, mount your filesystem in read-write mode as by default its in read-ony mode. To mount filesystem in read-write type “mount -o remount,rw /sysroot” & than type “chroot /sysroot” to make changes to filesystem

resetting root password

Once above steps are completed , we can type “passwd” command & can reset our password.

resetting root password

Now, type “exit” & than “reboot” to reboot he system.

This was tutorial on resetting your password for root. If you have any queries, please mention them below in comment box & I will get back to you .

Also, read our other Linux tutorials .

 

If you think we have helped you or just want to support us, please consider these :-

Connect to us: Facebook | Twitter | Google Plus

Become a Supporter – Donate us some of you hard earned money:

Linux TechLab is thankful for your continued support.

Shusain

Passionate about Linux & open source. Loves to learn, read & write about Linux as well as new technologies.

You may also like...

3 Responses

  1. Arun says:

    YOu need to add

    rd.break enforcing=0

    • Shusain says:

      Process mentioned above works too. Enforcing=0 is used when we have SELINUX enabled on our system, it omits the SElinux relabelling process. But if you don’t have selinux enabled, you can only use rd.break.

  1. February 16, 2018

    […] Source: How to reset ROOT password in RHEL/CentOS – LinuxTechLab […]

Leave a Reply

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