How to reset root password in rhel centos

Page 1

Object 1

LinuxTechLab.com

How to reset ROOT password in RHEL/CentOS

Originally published on

LinuxTechLab.com


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

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”


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

Once above steps are completed , we can type “ passwd” command & can reset our 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

LinuxTechLab.com



Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.