How to reset Kali Linux root password

It’s possible to reset Kali Linux password in the event that you are no longer able to login to the root user account. This happens if you haven’t logged in for a while and have since forgot Kali Linux password. In case you have not already tried, the default Kali password for root user is toor (root backwards) on VMWare and live images. Try logging in with this password before resetting the Kali Linux password.

In this tutorial, we will go through the step by step instructions to reset the Kali Linux administrator password. This will involve editing the boot parameters to login to allow access to reset Kali Linux password. Read on to learn how.

DID YOU KNOW?
You ordinarily should not need the root password, and one may not even be set on your Kali system. Instead, you should use the sudo command to run commands as root. For help with using sudo or logging into the root account in terminal, see our guide on Kali Linux default password.

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
How to reset Kali Linux root password
How to reset Kali Linux root password

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 password step by step instructions




Follow along with the steps below to set a new Kali Linux password. Note that you will need physical access to the device, as it is necessary to access the GRUB boot menu.

  1. 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.

    Boot to Kali GRUB menu
    Boot to Kali GRUB menu
  2. 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.
    Enter GRUB edit mode
    Enter GRUB edit mode

    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.

    Edit GRUB menu entry
    Edit GRUB menu entry



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

    Confirm root partition permissions
    Confirm root partition permissions
  4. 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.

    Reset root password - kali linux
    Reset root password – kali linux
  5. Reboot Kali
    At this stage you are done. Simply reboot your system or continue booting using the following linux command:

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

Reset Kali Linux Password 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

Closing Thoughts

In this tutorial, we saw how to reset Kali Linux password for the root user account. For users that forgot Kali Linux password, there is no need to panic, as this process can always be used to log back in and reset your password. In the most recent versions of Kali Linux, the root account shouldn’t have a password at all, and users are expected to execute commands with administrator privileges through use of the sudo utility.