Reset Kali Linux Password

Kali Linux is a Debian-derived Linux distribution designed for penetration testing and digital forensics, adopted by both hackers and security professionals. Users may find themselves unable to login due to a forgotten password or after installing Kali in a virtual environment or dual boot configuration. This article explains how to reset the Kali Linux password using the built-in recovery options.

When locked out of the system, users typically encounter a login prompt where entering incorrect credentials results in access denial.

Kali Linux login screen showing password prompt

Step-by-Step Password Reset Process

Step 1: Access GRUB Boot Menu

Reboot your Kali Linux system and select Advanced options for Kali GNU/Linux instead of the default boot option. This provides access to recovery and troubleshooting tools.

GRUB boot menu showing advanced options

Step 2: Enter Recovery Mode

Select the recovery mode option (usually the second entry) and press the e key to edit the boot parameters. Do not press Enter at this stage, as we need to modify the kernel parameters first.

GRUB recovery mode selection screen

Step 3: Modify Kernel Parameters

In the boot parameter editor, locate the line containing ro (read-only). You need to make two critical changes:

  • Replace ro with rw (read-write) to enable filesystem modifications

  • Add init=/bin/bash at the end of the line to boot directly into a bash shell

GRUB parameter editor showing ro parameter

After making these modifications, the line should appear as shown below. Press F10 to save the changes and boot with the modified parameters.

Modified GRUB parameters with rw and init=/bin/bash

Step 4: Reset the Password

The system will boot into a root shell environment. Execute the following commands to reset the password:

mount -o remount,rw /
passwd root

The first command ensures the filesystem is mounted in read-write mode. The second command prompts you to enter a new password for the root account. You will need to type the new password twice for confirmation.

Terminal showing successful password change

Step 5: Reboot the System

Once the password has been successfully updated, reboot the system using:

reboot -f

The system will restart normally, and you can now login using the newly set password.

Key Points

  • This method works because it bypasses the normal init process and provides direct root access

  • The rw parameter is essential for making filesystem changes

  • Always use reboot -f to force a clean restart after password changes

  • This technique requires physical access to the machine or console access in virtual environments

Conclusion

Resetting a forgotten Kali Linux password is straightforward using the GRUB recovery mode and kernel parameter modification. This method provides direct root shell access, allowing you to change passwords without needing the original credentials. The process is particularly useful for penetration testers and security professionals who frequently work with multiple Kali installations.

Updated on: 2026-03-17T09:01:38+05:30

2K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements