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.
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
2.3 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
2.5 Use Ctrl–x or F10 to boot with modified line, follow screen will appear
3 Change password
3.1 Enter following command
3.2 Enter new password then retype the new password
Now restart the system with physical button (Do not use reboot command this time)
Now you can login with the new password.
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