How To Reset Kali Linux Password

4 min read

How to Reset Kali Linux Password – A Step‑by‑Step Guide

Resetting a forgotten Kali Linux password is a common task for system administrators, security professionals, and students who need to regain access to their machines. Worth adding: whether you are using a virtual machine, a dual‑boot installation, or a dedicated hardware box, the process is straightforward once you know the right commands. Practically speaking, this article explains how to reset Kali Linux password using four reliable methods, provides the underlying scientific explanation of why each works, and answers the most frequently asked questions. By following the steps below, you will be able to restore administrative access without reinstalling the operating system or losing data.

Understanding Password Reset in Kali Linux

Kali Linux is built on Debian, which uses the standard Unix password management system. User passwords are stored in the /etc/shadow file, which contains encrypted password hashes. Worth adding: when you change a password with the passwd or usermod commands, the system updates this file with a new hash. Resetting the password therefore means replacing the old hash with a new one, or temporarily granting root privileges to set a new password manually.

  • /etc/shadow – stores password hashes securely.
  • Root user – has unrestricted access and can modify any user’s password.
  • Single‑user mode – boots the system into a runlevel where only root can log in, simplifying password changes.

Understanding these fundamentals helps you choose the most appropriate reset method for your situation.

Method 1 – Using the usermod Command

The usermod command allows you to modify user attributes, including the password. This method is ideal when you can still log in as root or have sudo privileges The details matter here. Which is the point..

  1. Open a terminal and become root (if you have sudo rights):
    sudo -i
    
  2. Run the usermod command to set a new password:
    usermod -p NEW_PASSWORD_USERNAME
    
    Replace NEW_PASSWORD with the desired clear‑text password and USERNAME with the target account name.
  3. Verify the change:
    passwd -S USERNAME
    
    The output should show U (locked) or P (locked) indicating the password status.

Why it works: usermod updates the entry in /etc/shadow directly, replacing the old hash with the new one. This is the fastest way to reset a password when root access is available Not complicated — just consistent..

Method 2 – Using the passwd Command

If you are already logged in as the user whose password you want to change, the passwd command is the simplest approach That's the part that actually makes a difference..

  1. Log in (or switch to the user) and execute:
    passwd
    
  2. Enter the current password (if known) or skip this step if you are using root.
  3. Type the new password twice to confirm.
  4. Password aging options can be set, but you can press Enter to accept defaults.

Important note: Never reuse old passwords that are still recognizable; choose a strong, unique password to enhance security But it adds up..

Why it works: The passwd utility reads and writes the /etc/shadow file, performing the same hash replacement as usermod but in a user‑friendly interactive format Worth keeping that in mind..

Method 3 – Resetting via Recovery Mode

Every time you cannot log in at all, booting into recovery mode provides a root shell without needing the user’s password.

  1. Reboot the system and hold the Shift key (BIOS) or Esc key (UEFI) to access the GRUB menu.
  2. Choose the “Advanced options for Kali Linux” entry, then select the recovery mode option (usually the one ending with (recovery mode)).
  3. You will be presented with a menu; choose “root – Drop to root shell prompt”.
  4. Remount the root filesystem in read-write mode:
    mount -o remount,rw /
    
  5. Reset the password using either passwd or usermod for the desired user:
    passwd USERNAME
    
  6. Reboot the system:
    reboot
    

Why it works: Recovery mode boots the kernel with limited services, mounting the root filesystem read‑write allows you to modify /etc/shadow directly, effectively resetting the password.

Method 4 – Using a Live USB

If the system’s bootloader is corrupted or you cannot access recovery mode, booting from a Kali Linux Live USB gives you full control over the disk.

  1. Create a bootable Kali USB using a tool like Rufus or Etcher.
  2. Boot the target machine from the USB and choose “Try Kali” (live environment).
  3. Open a terminal and identify the installed partition (e.g., sudo fdisk -l).
  4. Mount the root partition to a temporary directory:
    sudo
What's Just Landed

Straight Off the Draft

Kept Reading These

More Good Stuff

Thank you for reading about How To Reset Kali Linux Password. 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