DEV Community

Cover image for Reset centOS root password
Benedikt Schächner for Technology Schächner

Posted on

Reset centOS root password

Today, in this guide, we are going to show you how to reset CentOS root password if you forgot it.

If you like this or any other article, we would appreciate a Like & Comment! ❤️


Please note that you assume all responsibility for this - if unexpected problems arise, which is very unlikely, then you assume liability.

First of all we need to start CentOS.

Image description

Here we see that it will boot soon.

But before that happens, you need to prevent this by pressing any key on the keyboard.

Image description

Now it should look something like this. It is also possible that several entries exist. But that doesn't matter; here you simply have to select the first one by pressing the “a” key on your keyboard.

Image description

Now let's edit the kernel by adding a "1" after "quiet" after a space. As you can see in the picture this has already been done.

Now you need to press the Enter key and wait for the device to start booting. When it has booted then you have to

passwd
type in and you can change your password.

If you have any questions, we would ask you to just write them in the comments!

Thanks,
Schächner


All images are from an external source

Top comments (0)