You forgot your Kali Linux password, and you cannot log in anymore? No worries, in this blog post, we'll walk you through a step-by-step guide on how to reset your forgotten password on Kali Linux, so you can regain access to your system in no time. So, grab a cup of coffee and let's get started!
- Step 1 - Reboot into GRUB boot menu
- Step 2 - Edit the booting instructions
- Step 3 - Change password
Step 1 - 🎬 Reboot into GRUB boot menu
When the below screen is displayed, press "e" key to edit this boot menu.
Step 2 - ✏️ Edit the booting instructions
Now that we can edit the boot menu, let's make some changes. In a few words, this menu tells the machine what to boot and how to boot it. We will make some modifications to boot with bash command.
Find the line starting with "linux", and:
- Replace "ro" by "rw" (i.e. read-only mode is replaced by read-write mode)
- Add the end of the line, add: "init=/bin/bash"
So, you should start with:
And end with:
Once changes done, press: "CTRL+X"
It should reboot with bash command.
Step 3 - 🔐 Change password
You should see the following screen after booting:
Now, type: "passwd"
(If you need to change password for a specific user, you can add the username after passwd, like: "passwd username").
The prompt will ask you to define the new password, and to confirm it.
Once done, you can reboot, and you are all set.
Congrats 🥳 .