2 min read

🔐 How to reset a forgotten password on Kali Linux?

In 3 easy steps, you will reset your Kali Linux root password.
🔐 How to reset a forgotten password on Kali Linux?
Kali Linux

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!

3 steps

  • 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.

Kali Linux GRUB Boot menu (I'm using a Proxmox VM in this case)
Kali Linux GRUB Boot menu (I'm using a Proxmox VM in this case)

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:

  1. Replace "ro" by "rw" (i.e. read-only mode is replaced by read-write mode)
  2. Add the end of the line, add: "init=/bin/bash"

So, you should start with:

INITIAL - GRUB Boot instructions
INITIAL - GRUB Boot instructions

And end with:

NEW - GRUB Boot instructions
NEW - GRUB Boot instructions

Once changes done, press: "CTRL+X"

It should reboot with bash command.

Step 3 - 🔐 Change password

You should see the following screen after booting:

Kali Linux Booting in Bash Mode
Kali Linux Booting in Bash Mode

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 🥳 .