If you forgotten your root password for RHEL 6 and CentOS 6 systems don’t worry we are here to help you out on this.
Navigate to the following link if you want to reset forgotten root password on RHEL 7/CentOS 7.
This is generally happens when you use different password in a vast environment.
It can be done in many ways but we are going to show you the best two methods which we tried many times for our clients.
In Linux servers there are three different users are available. They are,
- Normal User,
- System User and
- Super User.
As everyone knows the Root user is known as super user in Linux and Administrator is in Windows.
We can’t perform any major activity without root password so, make sure you should have the right root password when you perform any major tasks.
If you don’t know or don’t have it, try to reset using one of the below method.
- Reset Forgotten Root Password By Booting into Single User Mode
- Reset Forgotten Root Password By Booting into Rescue Mode
Method-1: Reset forgotten root password by booting into single user mode
This is easy and native method to reset the forgotten root password in RHEL 6/CentOS 6 systems. Just follow our instruction to do the password reset without any headache.
Step-4: Once you hit
Enter key then it will take to you into single user mode. Just type
passwd command to reset the root user password. Finally reboot the system by issuing
init 6 or
shutdown -r now command.
Note: by default it will show you in the first line that you are in “Single User Mode” when you use
1 but it won’t show anything when you are get into single user mode with help of
single. To double confirm this, you can run
runlevel command to get the details.
Method-2: Reset forgotten root password by booting into rescue mode
This method is bit complicated compared to previous method however, this method also helps you to reset the forgotten Root password for RHEL 6 and CentOS 6 systems.
Step-1: Insert the bootable media through USB or DVD drive which is compatible for you and reboot your system. It will take to you to the below screen. Hit
Rescue installed system to launch the
Step-4: What type of Media Contains your Rescue Image? It won’t ask anything when you are using Virtual environment and It will prompt you if you use a physical system.
Step-12: Remove the bootable media then initiate the reboot.