password

Asked by shazdug

Hi

I am contacting you as I know of no other way to get an answer to this problem!!! I have loaded ubuntu on to my computer as the primary system. When I turn the system on ubuntu ask’s for a password. My computer is locked out as I have never out a password on it.

Can you help.

Doug

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Matt Darcy
Solved:
Last query:
Last reply:
Revision history for this message
Ralph Janke (txwikinger) said :
#1

Thanks for the question.

When installing ubuntu, you are asked for a user account name and a password. This is what you have to enter in the login screen.

If you have forgotten the details, you need to boot in single user mode.

Boot your computer and choose in the boot menu the line with "(recovery mode)" at the end. This will boot your computer in single user mode.

On the commandline enter the following command:

more /etc/passwd | grep 1000

The output will give you your user account. It is the name before the first colon.

Now you can enter

passwd <username>

where you replace "<username>" with the username you have found with the previous command.

This allows you to set a new password.

Finally you can enter

shutdown -r now

and this will reboot your computer and you can select the regular menu item in the boot menu, enter you username and password and use ubuntu in the normal way.

I hope this helps.

Revision history for this message
shazdug (shazdug) said :
#2

Hi,
I followed the above and the word b 4 the 1st colon was root! I did all the rest and entered the new password and rebooted. When the ubuntu logon screen came up I entered root and then the new password it told me the admi cant log on from this screen. I then enterd the new password and confirmed the new password I still get the message wrong user or pwd etc.

Regards
Doug

Revision history for this message
shazdug (shazdug) said :
#3

Also how would I find the user name??

Revision history for this message
Ralph Janke (txwikinger) said :
#4

Ok.. I think there is you problem.

Could it be that you entered the name root as your username? You should not do that. You would have this username twice (with uid =0 and uid = 1000). So it will in the login lookup the wrong one.

How many line do you get when you execute

grep root /etc/passwd

from the single user mode?

I would think that you get two. One has 0 between the 2nd and third colon and the other one has 1000.

If this is the case, you have two options. Either you reinstall ubuntu from the live-CD and this time enter a proper username. Or you need to add a user via commandline in single user mode which is a couple of commands

groupadd -g 1001 <username>
useradd -g <username> -u 1001 <username> -d /home/<username> -m
adduser <username> admin

Important!!!! Replace "<username>" with the username you want to use!

Now you should have a new user created with which you should be able to login with it after a reboot.

Hope this helps.

Revision history for this message
shazdug (shazdug) said :
#5

well having done all that it still wont let me in. I only have one line with a zero after the 2nd colon.
How do I get past the log in screen to re-install the program??

Doug

Revision history for this message
Matt Darcy (matt-darcy) said :
#6

the most straight forward procedure would be to re-install Ubuntu.

Pay attention to the screens you are shown during the install, and especially around the time where it asks you to create a user account.

You will be prompted for

1.) your name
2.) your username
3.) your password
4.) your workstation name

in 1.) enter your real name
in 2.) enter the username YOU want to login as, eg: if your name is ian smith, you can do, "ian", "ismith" "smithi" "smithy" or anything you want, something that is relevant to you and easy to remember
in 3.) enter the password you want YOUR username to have. Don't use "root"
in 4.) call your workstation what ever you like, be creataive.

when you want to login to your installation use the username and password you entered into options 2 and 3

This will also be the password you use when you are prompted for a password to use "super user" privileges

Revision history for this message
shazdug (shazdug) said :
#7

Hi Matt

I would love to re-install ubuntu but I cant get past the log in screen.Any
idea's.

Regards

Doug

-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of Matt
Darcy
Sent: Tuesday, 20 May 2008 7:07 PM
To: <email address hidden>
Subject: Re: [Question #33547]: password

Your question #33547 on Ubuntu changed:
https://answers.launchpad.net/ubuntu/+question/33547

    Status: Open => Answered

Matt Darcy proposed the following answer:
the most straight forward procedure would be to re-install Ubuntu.

Pay attention to the screens you are shown during the install, and
especially around the time where it asks you to create a user account.

You will be prompted for

1.) your name
2.) your username
3.) your password
4.) your workstation name

in 1.) enter your real name
in 2.) enter the username YOU want to login as, eg: if your name is ian
smith, you can do, "ian", "ismith" "smithi" "smithy" or anything you want,
something that is relevant to you and easy to remember
in 3.) enter the password you want YOUR username to have. Don't use "root"
in 4.) call your workstation what ever you like, be creataive.

when you want to login to your installation use the username and password
you entered into options 2 and 3

This will also be the password you use when you are prompted for a
password to use "super user" privileges

--
If this answers your question, please go to the following page to let us
know that it is solved:
https://answers.launchpad.net/ubuntu/+question/33547/+confirm?answer_id=5

If you still need help, you can reply to this email or go to the
following page to enter your feedback:
https://answers.launchpad.net/ubuntu/+question/33547

You received this question notification because you are a direct
subscriber of the question.

Revision history for this message
shazdug (shazdug) said :
#8

Hi Matt

I would love to re-install ubuntu but I cant get past the log in screen.Any
idea's.

Regards

Doug

Revision history for this message
Ralph Janke (txwikinger) said :
#9

You need to boot from the live-CD and reinstall ubuntu.. there will be no login screen on the live-CD

Revision history for this message
Best Matt Darcy (matt-darcy) said :
#10

As Ralph has suggested, if you boot from the Ubuntu installation CD you'll be logged into a desktop automatically, you can then pickup the install process I suggested.

You should see an "install" icon in the top left of the desktop of the install / live cd.

Revision history for this message
shazdug (shazdug) said :
#11

Hi Matt
I could not get the disc to read from boot so I went in to the bios and found that the cd was not activated sorted that out and have now re-installed the program and all is fine.

Cheers

Doug