If forgot username or password in Kali or debian
- reboot system
- click on advanced options for kali linux
- type "e" for edit
- scroll down to where you see the two word echo and linux
- Under linux go to where you see "ro" for read only and change it to "rw" for read and write
- go to the end of the line and add the following line next to either "single" or it may be something else " init=/bin/bash"
- press contrl + x
- here you can change the password of root with password
- or grep for the username you forgot using the following command:
grep -i "\b$\b" /etc/shadow
- now you can change the password using
passwd and username