LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   I lost my Ubuntu user name and/or password (http://www.linuxquestions.org/questions/linux-newbie-8/i-lost-my-ubuntu-user-name-and-or-password-597888/)

dieterschmied 11-07-2007 06:18 PM

I lost my Ubuntu user name and/or password
 
I recently install Ubuntu rather than Windows with reservation as I am not familiar with Ubuntu, Linux and I don't know the jargon. In any case, I must have used a username or password that was unique to me as I try to use the same six letter password and username for everything. Well, it appears that I don't know either or both. How can I get into my computer to fix this thing?

I have visited a lot of threads and tried the suggestions but I have had no luck. One problem appears to be that all of the suggestions either assume that all user have the same level of expertise or they forget a step or two.

I tried the "escape" when trying to boot up and I have yet to find a "root" that will accept a command. I am at : "root@d-desktop:~#" and I haven't a clue. Any help from anyone with a precise suggestion?

I have a second computer, which I am using for this inquiry that I could use to follow any suggestions precisely.

Or would I be better off reformatting and maybe go back to windows?

Dieter Schmied
dieter@one.net

matthewg42 11-07-2007 06:30 PM

root is the name of the administrator user on the system. The "root prompt" is what is printed by a command-line "shell", and you can enter into it textual commands.

I don't know what this "escape" is you mentioned, please could you describe what you mean?

If you are looking at a screen with "root@d-desktop:~#" on it on the computer which you are talking about (where you want to find out what username and password you set up during installation), here's how:

To find the user name which was set up during installation of Ubuntu, type in this command (this is case-sensitive):
Code:

grep x:1000 /etc/passwd | cut -d: -f1
In my case this prints out my user name, "matthew"

There is not a good way to get the original password for this user, but you can reset it to a new value with this command:
Code:

passwd matthew
Of course, you will have to replace the "matthew" in that command with whatever your user name is. You will be prompted to enter the new password twice to protect against typing errors.

iramki4u 08-31-2012 02:23 PM

Quote:

Originally Posted by matthewg42 (Post 2951480)
root is the name of the administrator user on the system. The "root prompt" is what is printed by a command-line "shell", and you can enter into it textual commands.

I don't know what this "escape" is you mentioned, please could you describe what you mean?

If you are looking at a screen with "root@d-desktop:~#" on it on the computer which you are talking about (where you want to find out what username and password you set up during installation), here's how:

To find the user name which was set up during installation of Ubuntu, type in this command (this is case-sensitive):
Code:

grep x:1000 /etc/passwd | cut -d: -f1
In my case this prints out my user name, "matthew"

There is not a good way to get the original password for this user, but you can reset it to a new value with this command:
Code:

passwd matthew
Of course, you will have to replace the "matthew" in that command with whatever your user name is. You will be prompted to enter the new password twice to protect against typing errors.


Excellent !!! its working.. thank u for the post

daho 10-11-2012 07:29 PM

Thank you! It helped me.


All times are GMT -5. The time now is 08:40 PM.