How To Reset Password In Kali Linux

5 min read

Forgetting the root or user password on a Kali Linux machine can feel like hitting a brick wall, especially when you are in the middle of a critical penetration testing engagement or a certification exam like the OSCP. Because Kali is designed as a specialized offensive security distribution, it does not always behave like a standard Ubuntu or Debian desktop installation when it comes to recovery modes. Which means knowing how to reset password in Kali Linux is a fundamental survival skill for any security professional or student. This guide covers the most reliable methods, ranging from the standard GRUB single-user mode to advanced live boot techniques, ensuring you regain access without reinstalling the operating system.

Understanding the Kali Linux Authentication Structure

Before diving into the recovery procedures, it — worth paying attention to. Modern Kali Linux installations (2020.1 and later) default to a standard non-root user account created during installation, rather than the traditional root/toor default. The root account is typically locked by default, meaning it has no valid password hash in /etc/shadow But it adds up..

When you "reset the password," you are usually targeting one of two scenarios:

  1. Standard User Account: The daily driver account with sudo privileges.
  2. Root Account: The superuser account, which may need unlocking and a password set for specific administrative tasks or legacy tool compatibility.

The method you choose depends heavily on whether you have physical access (or console access via hypervisor) and whether the disk is encrypted with LUKS Not complicated — just consistent. Surprisingly effective..

Method 1: Resetting via GRUB Single-User Mode (Standard Approach)

This is the fastest and most common method for bare-metal installations or virtual machines where you can interrupt the boot process. It requires access to the GRUB bootloader menu Took long enough..

Step-by-Step Procedure

  1. Reboot the System: Start or restart your Kali Linux machine.
  2. Access the GRUB Menu: Immediately after the BIOS/UEFI splash screen, hold down the Shift key (BIOS) or press Esc repeatedly (UEFI) to force the GRUB menu to appear. In VirtualBox or VMware, you may need to click inside the VM window quickly and press the key.
  3. Edit the Boot Entry: Use arrow keys to highlight the default Kali entry (usually the top one). Press e to edit the boot parameters.
  4. Locate the Kernel Line: Scroll down using arrow keys to find the line starting with linux or linuxefi. It looks similar to: linux /boot/vmlinuz-6.x.x-kali-amd64 root=UUID=xxxx ro quiet splash
  5. Modify Boot Parameters: Go to the end of that line. Add a space followed by: rw init=/bin/bash
    • rw: Mounts the root filesystem as read-write. This is critical; without it, the filesystem remains read-only, and you cannot write the new password hash to /etc/shadow.
    • init=/bin/bash: Tells the kernel to launch a Bash shell immediately instead of the standard systemd init process, dropping you straight into a root shell.
  6. Boot into Single User Mode: Press Ctrl + x or F10 to boot with these modified parameters.
  7. Verify Filesystem Write Access: You will land at a prompt like root@kali:/#. Run the following command to ensure the root partition is mounted read-write:
    mount -o remount,rw /
    
  8. Reset the Password:
    • For a standard user (e.g., kali):
      passwd kali
      
    • For the root account (unlocks and sets password):
      passwd root
      
    Enter the new password twice. Note that characters will not appear on screen (no asterisks).
  9. SELinux/Relabeling (If Applicable): If you are running a hardened kernel or specific configurations, run:
    touch /.autorelabel
    
  10. Reboot: You cannot use the standard reboot command because systemd isn't running. Use the kernel magic sysrq keys or force a reboot:
    exec /sbin/init
    
    Alternatively, press Alt + SysRq + b (may not work in all VMs) or simply hard reset the VM/Power button.

Method 2: Using a Kali Live USB (The "Chroot" Method)

If you cannot access GRUB (e.Now, g. , password-protected bootloader, UEFI secure boot complications, or corrupted GRUB config), booting from a Kali Live USB is the professional standard for recovery. This method works even if the target installation uses LUKS Full Disk Encryption, provided you know the decryption passphrase Nothing fancy..

Prerequisites

  • A Kali Linux Live USB (same architecture/version as installed system recommended).
  • Knowledge of the LUKS passphrase if encryption is used.

Procedure

  1. Boot from Live USB: Select "Live System" or "Graphical Live" from the boot menu. Do not select "Install" or "Graphical Install".
  2. Open Terminal: Once the live desktop loads, open a terminal.
  3. Identify Partitions: Run lsblk -f or fdisk -l to identify your target partitions.
    • Look for crypto_LUKS type if encrypted.
    • Standard setup usually shows: sda1 (EFI), sda2 (Boot), sda3 (Root/LUKS).
  4. Decrypt LUKS (If Encrypted):
    cryptsetup luksOpen /dev/sda3 kali_crypt
    # Enter your LUKS passphrase when prompted
    
    The decrypted device will appear at /dev/mapper/kali_crypt.
  5. Mount the Root Filesystem:
    mount /dev/mapper/kali_crypt /mnt
    # If /boot is separate:
    mount /dev/sda2 /mnt/boot
    # If EFI is separate:
    mount /dev/sda1 /mnt/boot/efi
    
  6. Bind Mount Virtual Filesystems: This prepares the environment for chroot.
    mount --bind /dev /mnt/dev
    mount --bind /proc /mnt/proc
    mount --bind /sys /mnt/sys
    mount --bind /run /mnt/run
    
  7. Chroot into the System:
    chroot /mnt
    
    Your prompt should change to root@kali:/#, indicating you are now operating inside the installed system.
  8. Reset the Password:
    passwd kali  # Or your username
    # Or for root:
    passwd root
    
  9. Update Initramfs (Critical for LUKS): If you changed the root password and use LUKS, ensure the initramfs knows about the keyboard layout for the decryption prompt:
    update-initramfs -u -k all
    
  10. Exit and Reboot:
    exit
    umount -R /mnt
    reboot
    

Method 3: Resetting via Recovery Mode (GRUB Menu Option)

Some Kali installations (especially those upgraded from older versions or installed via specific ISOs) present a "Advanced options for Kali GNU/Linux" submenu in GRUB containing a "

Coming In Hot

Just Hit the Blog

For You

Dive Deeper

Thank you for reading about How To Reset Password In Kali Linux. We hope the information has been useful. Feel free to contact us if you have any questions. See you next time — don't forget to bookmark!
⌂ Back to Home