Forgot your Kali Linux password? You can bypass the login screen and set a new one using a single GRUB menu edit. This guide shows you exactly how to reset Kali Linux password in under five minutes, even if you have zero command-line experience.
Losing access to your Kali system is frustrating, but it’s not the end of the world. The process is straightforward, requires no bootable USB, and works on all recent versions of Kali Linux.
How To Reset Kali Linux Password
This method uses the GRUB bootloader to drop into a root shell. From there, you change the password directly. No hacking tools needed—just a few keystrokes at boot time.
What You Will Need
- Physical or virtual access to the Kali machine
- Keyboard during boot
- About 2 minutes of your time
Step 1: Access The GRUB Menu
Restart or power on your Kali system. As soon as the BIOS screen disappears, press and hold the Shift key (or Esc on some systems) to bring up the GRUB menu.
If you see a purple or black screen with a list of kernel options, you’re in the right place. If the system boots straight to login, restart and try pressing Shift earlier.
Step 2: Edit The Boot Entry
Use the arrow keys to highlight the first entry (usually “Kali GNU/Linux”). Do not press Enter. Instead, press the e key to edit the boot parameters.
You’ll now see a text editor with several lines. Don’t be intimidated—you only need to change one line.
Step 3: Modify The Linux Line
Look for a line that starts with linux or linuxefi. It contains kernel parameters like quiet and splash. Use the arrow keys to navigate to the end of that line.
Add a space, then type:
init=/bin/bash
This tells the kernel to boot directly into a bash shell instead of the normal init process. No password required.
If your system uses UEFI, the line might be slightly different, but the same edit works.
Step 4: Boot Into Single-User Mode
Press Ctrl+X or F10 to boot with the modified parameters. The screen will fill with text, and within seconds you’ll be dropped into a root shell prompt (root@(none):/#).
At this point, the root filesystem is mounted as read-only. You need to remount it as read-write to make changes.
Step 5: Remount The Root Filesystem
Type the following command and press Enter:
mount -o remount,rw /
You should see no output, which means it worked. To confirm, type mount | grep " / " and look for “rw” in the output.
Step 6: Reset The Password
Now type:
passwd
The system will prompt you to enter a new password. Type it once, press Enter, then type it again to confirm. The password won’t appear on screen as you type—that’s normal.
If you see “password updated successfully,” you’re done with the shell part.
Step 7: Reboot Normally
Type exec /sbin/init or simply reboot -f to restart the system. If you used exec /sbin/init, wait for the normal boot process to complete.
When the login screen appears, enter your new password. You’re back in.
Alternative Method: Using A Live USB
If GRUB editing doesn’t work (rare, but possible on encrypted systems), you can use a Kali live USB to reset the password.
Step 1: Boot From Live USB
Insert your Kali live USB and boot from it. Choose “Live system” from the menu.
Step 2: Mount The Installed Partition
Open a terminal. Identify your installed partition with lsblk or fdisk -l. Usually it’s /dev/sda1 or /dev/nvme0n1p1.
Mount it to /mnt:
mount /dev/sda1 /mnt
Step 3: Chroot Into The System
Change root into the mounted partition:
chroot /mnt
Now you’re inside your installed system as root.
Step 4: Reset The Password
Run passwd and set a new password. Exit the chroot with exit, then reboot without the live USB.
This method is slightly longer but works even if the GRUB edit fails.
What If The Password Reset Doesn’t Work?
Sometimes the process seems to succeed but the new password doesn’t work at login. Here are common reasons and fixes.
Filesystem Is Still Read-Only
If you forgot to remount the root filesystem as read-write, the password change appears to succeed but isn’t saved. Repeat the steps and make sure you run mount -o remount,rw / before passwd.
Encrypted Home Directory
If your home directory is encrypted (ecryptfs), resetting the root password doesn’t give you access to encrypted files. You’ll need to reset the user password instead.
After booting into the shell, identify the username with cat /etc/shadow. Then use passwd username (replace “username” with the actual name).
SELinux Or AppArmor Interference
Kali doesn’t use SELinux by default, but if you’ve added it, the password change might be blocked. Temporarily disable SELinux by adding selinux=0 to the GRUB edit alongside init=/bin/bash.
Security Considerations After Resetting
Now that you’re back in, take a moment to secure your system. Anyone with physical access can reset your password using this method. Consider these steps.
Encrypt Your Disk
Full disk encryption (LUKS) prevents this GRUB trick from working. If your Kali installation isn’t encrypted, the next reset attempt will succeed for anyone with keyboard access.
Set A BIOS Password
A BIOS password prevents unauthorized users from booting from USB or editing GRUB. It’s an extra layer of security that costs nothing.
Use A Strong Password
Your new password should be at least 12 characters long, mixing letters, numbers, and symbols. Avoid common words or patterns.
Frequently Asked Questions
Can I Reset A Kali Linux Password Without A Live USB?
Yes. The GRUB edit method requires no external media. You only need access to the boot menu.
Does This Work On Kali Linux 2024 And Newer?
Yes. The process is identical on all versions. The GRUB bootloader hasn’t changed significantly in years.
What If My Kali System Uses UEFI?
UEFI systems still use GRUB. The edit is the same, but you might need to press Esc instead of Shift to access the menu.
Can I Reset The Root Password For A Non-root User?
Yes. After booting into the shell, use passwd username instead of just passwd.
Is This Method Considered A Security Vulnerability?
It’s a feature of the boot process, not a bug. Disk encryption and BIOS passwords mitigate the risk.
Common Mistakes To Avoid
- Typing
init=/bin/bashin the wrong line. Make sure it’s at the end of thelinuxline. - Forgetting to remount the filesystem. Without it, the password change is lost on reboot.
- Pressing Enter too early during GRUB edit. Use Ctrl+X or F10 to boot.
- Using a live USB but mounting the wrong partition. Double-check with
lsblk.
When To Use Each Method
The GRUB edit is faster and doesn’t require a second device. Use it if you can access the boot menu. The live USB method is a fallback if GRUB is broken or password-protected.
If you’re resetting a password on a remote server with out-of-band management (like iDRAC or IPMI), the live USB method might be easier because you can mount the virtual ISO.
Resetting Password On Dual-Boot Systems
If Kali is installed alongside Windows, the GRUB menu still appears. The process is identical. Just make sure you select the Kali entry before pressing e.
Windows boot manager won’t interfere because you’re editing the Linux kernel parameters, not Windows.
What About WSL Or Virtual Machines?
For Kali running in Windows Subsystem for Linux (WSL), reset the password from within Windows using wsl -u root then passwd. The GRUB method doesn’t apply to WSL.
For virtual machines (VirtualBox, VMware), press Shift during the VM boot screen. The GRUB menu appears just like on physical hardware.
Final Tips For A Smooth Reset
Write down the steps before you start. If you’re nervous, practice on a test VM first. The process is forgiving—if you make a mistake, just reboot and try again.
After resetting, test the new password immediately. If it fails, reboot and repeat the process. Most failures come from typos or forgetting the remount step.
Keep a backup of your important files. While password reset doesn’t delete data, accidental commands during the shell session could cause issues.
You now know exactly how to reset Kali Linux password using two reliable methods. Whether you’re locked out of a lab machine, a personal laptop, or a virtual instance, these steps will get you back in control.