How to reset Kali Linux root password

This guide will provide you with an information on how to reset lost or forgotten root ( administrator ) password on Kali Linux.

In this tutorial you will learn:

  • How to boot Into GRUB menu on Kali Linux
  • How to edit GRUB menu
  • How to check RW permissions on the root partition
  • How to reset Kali root password and reboot the system

Boot to Kali GRUB menu

Boot to Kali GRUB menu

Software Requirements and Conventions Used

Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Kali Rolling Release
Software N/A
Other Privileged access to your Linux system as root or via the sudo command. Physical access to your computer or virtual machine with the Kali Linux installation is required.
Conventions # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – requires given linux commands to be executed as a regular non-privileged user

How to reset Kali Linux step by step instructions



  1. Boot Into GRUB menu
  2. Boot to Kali GRUB menu

    Reboot your Kali Linux system into the GRUB boot menu. Highlight the default boot menu you are usually booting from and press the e key in order to edit this boot menu entry.

  3. Edit GRUB menu
  4. Enter GRUB edit mode

    Once you entered the GRUB menu edit mode you will be presented with the following window. Scroll down until you hit the line starting with keyword linux.
    Edit GRUB menu entry

    After you have located the appropriate boot entry as specified by the previous step, use navigational arrows to look for keyword ro and replace it with keyword rw. Next, on the same boot entry find keyword quiet and replace it with init=/bin/bash.



  5. Check RW permissions on root partition
  6. Confirm root partition permissions

    Type mount command and look for / root mount partition. Confirm that this partition is mounted with rw permissions.

  7. Reset Kali root password
  8. Reset root password - kali linux

    At this point we are ready to reset the root user password. Type passwd command and enter your new password. Enter the root password again to verify. Press ENTER and confirm that the password reset was successful.

  9. Reboot Kali
  10. At this stage you are done. Simply reboot your system or continue booting using the following linux command:

    root@(none):/# exec /sbin/init
    


    Troubleshooting

    Enter new UNIX password:
    Retype new UNIX password:
    passwd: Authentication token manipulation error
    passwd: password unchanged
    

    Your root partition is mounted read-only. Try:

    # mount -o remount,rw /
    

    to resolve this issue.


    [ end Kernel panic - not syncing: Attempted to kill init! exit code=0x0007f00
    

    Make sure that you removed splash boot option when editing grub’s menu item.


    When trying to reboot with reboot command I get:

    Failed to connect to bus: No such file or directory
    Failed to talk to init daemon.
    

    Ignore, and reboot with:

    # exec /sbin/init