I just reinstalled Kali Linux 2020.2 because I had too many problems earlier. I created a new username and password in the Kali Linux installation. I wrote the password to a file, but already forgot the username. I'm wondering if there's a way to dump system users. I'm currently stuck on login. If anyone can help me I would appreciate it.
22 Answers
You can reset your password through init=/bin/bash trick.
- First boot Kali Linux GRUB menu.
- Now in GRUB menu, select "Kali GNU/Linux" and press "e".
- Then in the next screen find a line starting with "linux".
- There replace "ro" with "rw" and replace "quiet" with "init=/bin/bash".
- Now type command
mountin the shell. - And then type command
passwd user_nameto reset password. - Now reboot with
exec /sbin/init.
Hope that helps
Note: If you have forgot your username to then you can run cat /etc/passwd to search for your username, or to filter only usernames run awk -F: '{ print $1}' /etc/passwd
Run cat /etc/passwd and see which one is your username. It's likely you'll see a lot of entries, but this is normal, because a lot of daemons run as their own user.