Can't remember login name

Asked by William H Roberts on 2012-02-12

I've been ill for a while and forgot my username and password for Ubuntu.
How do I get past the login screen to build another ID?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu shadow Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
2012-02-12
Last query:
2012-02-12
Last reply:
2012-02-12

Hold shift at boot, select recovery mode then select root, you can now run:

ls /home

which in upper case would be:

LS /HOME

You can now see the usernames on the system. You can now run:

passwd foo

replacec foo with your username, then set your password. Then run:

reboot

Let the system boot as normal and you can log in as your username with your new password.

Excellent! I was able to get through it.
 The PC I'm using is quirky, and needed to be cajoled.

Thanks very much, actionparsnip

Bill1904