BEST WAY How to Recover or Reset Linux Password

BEST WAY How to Recover or Reset Linux Password. This will guide you how to reset Linux root password on most Linux distros. Usually all of Linux systems now use GRUB boot loader, but for older systems still using LILO boot loader.



This article provide 2 methods of resetting Linux password for Linux system using GRUB and using LILO boot loader.

Reset Linux Password for Systems Using GRUB Boot Loader

1. Enter GRUB menu
Power up your system. Coomonly after the BIOS post, GRUB menu will be loaded automatically and display a list of kernels to boot from. Press e to edit the first GRUB menu option. If you cannot see your GRUB menu options press ESC key when prompted. GRUB menu look similar to this (click image to enlarge):

Reset Linux Password - Enter GRUB Meu

2. Select and entering GRUB menu
Use the arrow keys up and down, select the kernel line (press e key on your keyboard to edit).

Recover or Reset Linux Password - entering GRUB

3. Editing Kernel Boot
Kernel boot options may differ on your system, just be sure to append init=/bin/bash to end of the line and then press ENTER.

BEST WAY How to Recover or Reset Linux Password

4. Rebooting Linux System
Now that our boot options have been changed we are ready to boot the operating system. Press b key to boot.

5. Redirect Mount Point
After successfully rebooting your system, you will be presented with a command prompt. Here we need to mount / and /proc partitions with the following two commands:

mount -o remount,rw /mount -o remount,rw /proc

6. Resetting Password
Reset the root password for your Linux by typing the passwd command.

passwd

7. Sinc and Reboot Again
Before rebooting the system, it is a good idea to run the sync command.

syncreboot

Finished! You should now be able to login into the Linux system with your new root password.

See also  My 19 Best List Linux Software 2024 Complete List

Reset Linux Password for Systems Using GRUB Bootloader

1. Open Linux Single
At LILO boot loader command, type linux single and press the ENTER on your keyboard:

Boot: linux single

2. Reset Password
When presented with the command prompt, type the passwd command.

passwd

3. Sinc and Reboot
Before rebooting the system, it is a good idea to run the sync command.

syncreboot

Finished! Linux boot loader system with LILO is easier than GRUB for resetting password. You should now be able to login into the system with your new root password. Please share BEST WAY How to Recover or Reset Linux Password! Thank you