I need to recover or to set anew my authentication code.

Asked by mgold

I'm new to Ubuntu. Although it was installed on my computer some months ago, I've hardly used it at all. Consequently, I've forgotten the code to use to authenticate my acting as the Administrator (or whatever Ubuntu calls that). I've tried the password that I use to log in to Ubuntu, but that doesn't work to authenticate me as Administrator.
I sent this question in earlier today and I got two replies. I appreciate people trying to be helpful, but the first reply assumed that I know the authentication code (which, as I said, I don't). After concluding that the first reply was not a solution, I tried to find the second reply, but I could not. So I'm asking again: How do I set a new or recover my existing authentication code?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Whiteboard:
garyposter changed this from a Launchpad question to an Ubuntu question on 2009-2-3
Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#1

I don't remember user and password what i can do

You can do this: http://www.psychocats.net/ubuntu/resetpassword

or

To discover your user and restore (change) 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

or

passwd -d username

change username with your real user

Set your password.

Type in:

reboot

or

reboot -f

Hope this helps

Can you help with this problem?

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

To post a message you must log in.