Kali Linux

How to Set Forgotten Password on Kali Linux

How to Set Forgotten Password on Kali Linux

Setting up a strong password is crucial for ensuring your system security since it will help protect your data from unauthorized access. A good password contains a mixture of letters, numbers and symbolic representations. However, sometimes the user may forget the password that prevents them from accessing the system. In that case, they are forced to install the operating system from scratch because they are unable to find methods to change the password.

If you are using the Kali Linux system, read this guide to find the method to set your forgotten password on your system.

In this guide, you will learn:

How to Set Forgotten Password on Kali Linux

Setting a forgotten password on the Kali Linux system can be done easily from the main GRUB menu. The GRUB is a boot manager that allows you to load the operating system according to your choice. It scans your hard drive for a bootable operating system and loads them according to the one you need.

By default, GRUB doesn’t allow users to edit changes to the system, however, with slight modifications, you can change the settings and perform security sensitive procedures like changing the system password.

If you are worried about setting a forgotten password on Kali Linux, simply follow the below-given steps to complete the process:

Step 1: Open GRUB Boot Menu Edit Mode on Kali Linux

First, you must run Kali Linux on your system either on a Virtual Machine or as a stand-alone operating system. Then, when you are at the GRUB Boot menu, simply use CTRL+E buttons simultaneously:

Step 2: Search the linux Line at the GRUB Menu

At the GRUB Boot menu editing mode, simply scroll down and look for the boot entry starting with line linux. Then, navigate towards that line using the navigation arrow until you are at the boot entry option “ro quiet splash”:

Step 3: Replace Keywords at GRUB Menu

At the current option, replace ro (read) with rw (read and write), add init=/bin/bash in place of quiet to force the system to start the terminal at the next boot. You should also ensure removing the splash keyword right after the quiet line, so that, the final output will look like this:

Step 4: Boot the System to Command Line

Then, use CTRL+X to boot Kali Linux to Command Line, wait until the command line interface appears on the screen:

Step 5: Set the Password for Kali Linux

Now, you are at the command line interface, simply use the passwd command followed by the root keyword to set a new password for root on Kali Linux:

passwd root

Step 6: Enter and Retype New Password

During the process, you have to enter your New password, and press Enter after entering the password. Then again retype the New password that you have set previously to successfully update the root password on Kali Linux:

Note: If you have different users, you can replace root with the username to replace the password for that specific user on Kali Linux.

Step 7: Reboot the System

Now, for the changes to be successfully made and to enter into the Kali Linux system login interface, you must reboot the system from the command-line using the following command:

exec /sbin/init

Note: It is important to note that normal reboot command won’t work here because system has not been booted with systemd as init system, thus you will see the following error on the screen:

After following the above-given steps, you can login to your Kali Linux system with the new password you set in Step 6. However, it is important that you must enter the system as a root user in case you haven’t changed the password for another user.

Conclusion

You can set a forgotten password on Kali Linux by entering the GRUB menu using CTRL+E. Then, scroll down and replace “ro quiet splash” with “rw init=/bin/bash” to force the system to enter the editing mode. After you save the changes using CTRL+X, the device will reboot and enter the terminal mode after the reboot. At the terminal, simply use the passwd root command and set a password for your Kali Linux system and reboot the device using the “exec /sbin/init” command. After the reboot, you can enter Kali Linux with your new password and start using the operating system.

Similar Posts