can I find my username/ password?

Asked by Valentineman22

I forgot my username and password for ubuntu. Is there anyway to find it?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Valentineman22 (ryan-valentine2002) said :
#1

I installed ubuntu via the website and I can't remember the username and password. is there anyway to find that info?

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#2

To discover your user and restore the password you can:

Start the pc the when you see the GRUB row...

Press ESC.

Press "e" for edit.

Highlight the line that begins kernel ………, and press "e"

Go to the very end of the line, add rw init=/bin/bash

press enter, then press "b" to boot your system.

Your system will boot up to a passwordless root shell.

Type in grep -i 1000 /etc/passwd

The system must show a row with your user name at the start of the row
for example:
danilo:x:1000:1000:ubuntu,,,:/home/danilo:/bin/bash

Here my user is danilo

Then to change your user password type in:

passwd username

change username with your real user

Set your password.

Type in reboot

Hope this helps

Revision history for this message
bodhi.zazen (bodhi.zazen) said :
#3

Wow, that is the hard way marcobra :)

Boot to recovery mode

List users :

ls /home

set password with :

passwd <user_name>

then

init 2

The only way to "recover" a password would be with some kind of password cracker, and I do not think Launchpad is the appropriate location for discussions on how to use these tools, use Google.

Can you help with this problem?

Provide an answer of your own, or ask Valentineman22 for more information if necessary.

To post a message you must log in.