Recover a forgotten root password on Linux

Through this Blog, we will discuss on how to change root password in Linux OS. So, if you forget the root password or have lost your root password, here is a step by step instruction to reset the same. This will work on most of the Linux versions like: RedHat Enterprise Linux, Centos etc.

So the next question that comes to mind is – What is Linux?

Linux in short is a kernel software/package. You can say that Linux is an Operating System which works on kernel. Most of the distribution of Linux is available free to their user.

Linux is most secure operating system in world. The only thing you need is to have knowledge about the Advance Administration. This will help you to configure it for various security purposes.

What is root and root access?

Root is the username or account that by default has access to all commands, files and directory on Linux. It is also called as root user and superuser.

Note: This tutorial is only for learning purpose. We cannot be held responsible for any issues while executing the steps.

 

Let us now go through the Step by Step process of resetting root password in Linux

(RedHat Distribution, CentOS and Fedora):

(1)   Reboot the system by pressing CTRL+ALT+DELETE or use your traditional way to reboot it.

Interrupt the boot at the GRUB stage by pressing E button. A Linux version will get displayed:

reset root password bios

(2)  Press E to enter. Then select kernel line and press E again to enter

boot change

(3)     Now press one space and type 1 and press Enter.

Note: Here we are going to declare the run level of system as temporary in single user mode.

Runlevel declaration

(4)   After pressing enter you will get a screen like this –

kernel boot

(5)     Now press B to boot. Here you will get a single user mode terminal:

Type passwd to change your password

root password change

(6)   Give your new password carefully –

root password resetting

(7)    Here you have successfully reset your root password. Now sync your new password by typing sync 3 times [ this step is not mandatory]

(8)   Now reboot your system.

passwd

Root password has been changed now. You can start using this new password.

Keep visiting our blogs to learn Advance technology:  https://bigishere.wordpress.com/

 

Regards

Anand Pandey

Advertisements
Categories:

2 Comments

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s