How to reset Kali Linux forgotten root password – Reset Kali Linux password with single-user mode

Last Updated on

(Single-user mode will not ask for username and password for login, the user has superuser rights)

1 Boot into GRUB menu

1.1 Power on the Kali Linux

1.2 When following boot screen appears, press key to stop the “Booting in x seconds” counter.

Kali Linux 2019.4, 2020 - Boot screen
Kali Linux 2019.4, 2020 – Boot screen

2 Edit GRUB menu

2.1 Make sure the first option “Kali GNU/Linux” is highlighted.

2.2 Press “e” key to enter GRUB menu edit mode

Kali Linux 2019.4, 2020 - GRUB menu edit mode
Kali Linux 2019.4, 2020 – GRUB menu edit mode

2.3 Find line start with “linux”

Find line start with "linux"
Find line start with “linux”

2.4 Use arrow keys to navigate, change “ro” to “rw”, append “init=/bin/bash” at the end of the line

Use arrow keys to navigate, change "ro" to "rw", append "init=/bin/bash" at the end of the line
Use arrow keys to navigate, change “ro” to “rw”, append “init=/bin/bash” at the end of the line
Modified line
Modified line

2.5 Use Ctrlx or F10 to boot with modified line, follow screen will appear

Single-user mode
Single-user mode

3 Change password

3.1 Enter following command

# passwd

3.2 Enter new password then retype the new password

Change password
Change password

Now restart the system with physical button (Do not use reboot command this time)

Now you can login with the new password.

Bonus:

With most Linux distributions we can use following routine to reset the forgotten password

1 Enter GRUB menu with editing mode

2 Add single-user boot option to GRUB menu

3 Boot with modified GRUB menu

4 Change password with “passwd” command

5 Reboot with physical button

10 Replies to “How to reset Kali Linux forgotten root password – Reset Kali Linux password with single-user mode”

  1. Sitting here pulling my hair out trying to install Kali, finally get it sorted and I forgot the new password I created. Finally got it fixed thanks to this article. Thank you!

    1. If you are using the latest version of Kali Linux and followed the steps carefully, it should get you through.
      Don’t forget to use physical button to shutdown and start the PC at the end.

Leave a Reply

Your email address will not be published. Required fields are marked *