I installed kali and the next day after coming to work I forgot the username, I was able to find answers on how to change the password but not to get username info.
Asked
Active
Viewed 4.0k times
2 Answers
1
If you can get terminal access:
cut -d: -f1 /etc/passwd
This command will print a list of all users.
If you need to reset the user password, run:
passwd username
as root, where 'username' is your username.
To get root access, the default login is:
username: root
password: toor
If in doubt, as you've only recently installed Kali, you could consider reinstalling it
James Vickery
- 323
0
as root (or any user) in shell: getent passwd
Ipor Sircer
- 4,103
- 1
- 16
- 19
-
While this may answer the question, it would be a better answer if you could provide some explanation why it does so. – DavidPostill Sep 13 '16 at 17:21
cat /etc/passwd | grep /home, which should return a shorter list. If you post the whole list I might be able to guess which is yours – James Vickery Sep 13 '16 at 14:41cut -d: -f1 /etc/passwdoutput, I might be able to help you more – James Vickery Sep 13 '16 at 14:49ls -lrt /home, which shows the home directories and the users who own them. The last (most recently updated) of these will most likely be for the user you created. – AFH Sep 13 '16 at 14:54/etc/passwordentries. It assumes that the user has been created using normal home directory settings, which would almost certainly be the case for a user created during an installation. – AFH Sep 13 '16 at 14:59adduser username– James Vickery Sep 13 '16 at 15:26