Kali Linux is one of the popular Linux distro Today It is also called as Hacking OS. If you forget both user and root passwords this tutorial is for you.
How to reset Kali Linux root password
Reboot Kali Linux into Advanced Option for Kali GNU/LINUX
Then, select the second option recovery mode and press the “e” key and don’t hit enter button.
After that step, You will see in the image, the text “ro” in the red box and the empty red box required to have some modification as
Now, replace the text “rw” with the “ro”, and press the F10 button to save changes after adding the text init=/bin/bash at the end of the line.
The system will start rebooting and we got the shell to change the password. Type passwd command.
Now enter your new password. Enter the root password again to verify. Press ENTER and confirm that the password reset was successful.
How to reset Kali Linux User Password
Login into Kali Linux Root Account
Open the Terminal Window
Type passwd username
Replace username with your username. Now enter your new password. Enter the Username password again to verify. Press ENTER and confirm that the password reset was successful.