How to reset ROOT password in RHEL/CentOS7

How to reset ROOT password in RHEL7/CentOS7

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.

Comments

Popular posts from this blog

How to Set Up IP and Port-Based Virtual Hosting (Vhosts) With Apache Web Server on CentOS 7

Gateway to Gateway - Intro to Configure IPsec VPN (Gateway-to-Gateway ) using Strongswan

A Universal Installation Script for Google Chrome on Amazon Linux and CentOS