2

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.

0

2 Answers 2

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

19
  • I got a very long list of "users" starting with root, daemon, bin, sys.......
    – Ben Pettis
    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?
    – Ben Pettis
    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
0

as root (or any user) in shell: getent passwd

1
  • 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

Not the answer you're looking for? Browse other questions tagged .