When I used Kali today, because there were too many virtual machines and the passwords were different, I forgot the Kali login password (I have a memory like a fish, only seven seconds). . . .
Restart kali, enter the recovery system, press the e key to enter the edit mode
Move the cursor to the /boot/vmlinuz line, modify the ro before singal to rw, and in initrd=/install/initrd.gz Finally add init=/bin/bash,
After modification, press F10, select the direction pointed by the arrow in the picture below, press Enter, and directly enter the command line mode
Enter passwd on the command line , press Enter to enter the new password,
Restart and enter the kali graphical interface