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.
2 Answers
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
-
I got a very long list of "users" starting with root, daemon, bin, sys....... Commented Sep 13, 2016 at 14:36
-
1@BenPettis Do you recognise any? You could also try:
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 Commented Sep 13, 2016 at 14:41 -
after you command it says, ntp:x:112:114:: /home/ntp:/bin/false What does that mean? Commented Sep 13, 2016 at 14:44
-
@BenPettis 'ntp' is one of the usernames - the command, in this case, is to view usernames Commented Sep 13, 2016 at 14:49
-
@BenPettis If you edit your question to include the whole
cut -d: -f1 /etc/passwd
output, I might be able to help you more Commented Sep 13, 2016 at 14:49
as root (or any user) in shell: getent passwd
-
While this may answer the question, it would be a better answer if you could provide some explanation why it does so.– DavidPostill ♦Commented Sep 13, 2016 at 17:21