Kali Linux

How to Reset Kali’s Forgotten Password?

Kali Linux is one of the famous Linux distributions utilized for testing and security purposes. Like other operating systems, users need to set up a Kali username and password to use the system. These credentials secure the user’s data and save them from unauthorized access. Users can forget the password if they have not logged in to the system for a long time. If Kali users forget the password, they are unable to access the Kali account again. However, by login to the root user, the user can easily change the Kali user password.

The default password of the root user in Kali is “toor”. Sometimes, the user may fail to access the root account by using the default password. As in our case, the “toor” password does not work. To set up the root password, the user needs to reset it using the boot menu.

This write-up will demonstrate:

How to Reset Kali’s Forgotten Password?

While using any Linux distribution, users frequently need to provide a password while accessing the system, installing packages, and accessing administrative rights. If you have forgotten your Kali’s password, access the root user terminal using the “sudo su” command and change the password. But this will also be required to access the Kali system interface.

If the root password is not working to access Kali, then the user needs to change the password by accessing the GRUB boot menu. This method is quite tricky and allows any unauthorized access to your Kali Linux machine.

To reset Kali’s forgotten password, access the boot menu, open the bash shell in Kali, and reset the password. For demonstration, go through the below steps.

Step 1: Restart Kali Linux

Here, you can see we are unable to access the Kali Linux due to the password being incorrect. To reset the password, click on the above highlighted “Power” button and choose the “Restart” option to restart the Kali Linux:

Step 2: Open the GRUB Boot Menu

Next, the Kali boot menu will appear, quickly press “E” to open the Grub Boot menu:

Step 3: Allow Read and Write Permissions

After accessing the boot menu, find the “linux” from the appeared information:

At the end of that line, change the “ro” (read-only permission) to “rw” (read-write permission). Then, remove the “quiet splash” from the line:

Step 4: Load and Launch Kali’s Bash Terminal

After changing the permissions, add the following command at the end of “linux” line as shown below:

init=/bin/bash

After making the changes, press “CTRL+C” to save the change and open the bash terminal:

Here, Kali’s bash terminal is accessible on the system:

Step 5: Check the Current User

To check which user is accessing the bash terminal, run the “whoami” command:

whoami

Here, the root user is currently accessing the bash terminal in Kali:

If you have not accessed the terminal as root, run the “sudo” command. This will open the root user access to the terminal.

Step 6: Reset User Password

Now, set the Kali user password using the “passwd <user-name>” command:

passwd kaliuser

This operation will ask you to set the new password and retry the password for confirmation:

Here, the Kali user password is successfully updated.

Step 7: Reset Root Password

In order to set the root password, simply run the “passwd” command:

passwd

Provide the new root password and retry it for confirmation. The output shows that we have effectively updated the root user password:

Step 8: Reboot Kali

After resetting the user and root password, reboot the Kali system using the “reboot” command:

reboot -f

This will load the Kali desktop on the system. Login to Kali user account by providing username and updated password:

Here, you can see we have effectively reset the Kali’s forgotten password and access the Kali system:

We have covered the method to reset Kali’s forgotten password.

Conclusion

To reset Kali’s forgotten password, restart the Kali system and launch the Grub boot menu by pressing the “E” key on the system restart. After that, find out the line starts with “linux”, change the permissions to “rw” (read-write) and add the “init=/bin/bash” command at the end of the line to launch the bash terminal. After launching the terminal, run the “passwd <user-name>” command to change Kali’s user password. To change the “root” password, simply run the “passwd” command. We have covered how to reset Kali’s forgotten password.

About the author

Rafia Zafar

I am graduated in computer science. I am a junior technical author here and passionate about Programming and learning new technologies. I have worked in JAVA, HTML 5, CSS3, Bootstrap, and PHP.