Archive for January, 2019

Forgot or lost the root password of you Linux box.

Here you go some simple steps to reset your root password

Step 1: Press Ctrl+Alt+Delete to reboot the machine
Step 2: Press ESC to enter into the Grub menu options while the Linux server is booting up. This action avoids your server to boot as normal
Step 3: Select the server Kerenl and press e
Step 4: Then it shows Kerenl argument. At the end of the line Press Space bar and type single
Step 5: Press enter again
Step 6: Press b to boot the machine into single user mode

Now its time to reset the root password as it boots into a single user mode of root user. There you can setup the password with below commands

Step 7: passwd root (Simple you can run passwd command as it logs in with root user)

Type your custom password and Press enter. It prompts to enter the password again.

Enter the new password again. That’s it. It resets the password.

Step 8: Reboot the box and keep quiet until it asks for the root password. (It selects the kernel and boots the machine)

Now try with your new password. Hope it works.

Once logged in with your new password, try to check the runlevel position.  It shows multiuser mode.

We can check this with below command.

Step 9: runlevel

Might shows the output as N 3

That’s it 🙂 You all set to go run your box.