Logo 
Search:

Unix / Linux / Ubuntu Forum

Ask Question   UnAnswered
Home » Forum » Unix / Linux / Ubuntu       RSS Feeds

Forgotten Ubuntu Password

  Date: Dec 11    Category: Unix / Linux / Ubuntu    Views: 520
  

I forgot my Ubuntu password. Is there a way to get it back or change it? Or
should I just redo the whole thing?

Share: 

 

9 Answers Found

 
Answer #1    Answered On: Dec 11    

You will need to boot into single user mode and remove the root password. Then
you can boot normally, become root, and reset your user password. Detailed
instructions below courtesy of

http://www.linuxclues.com/articles/11.htm


By booting with your rescue CD (or to a live Linux CD, such as your original
Ubuntu install CD or Knoppix), you can bypass Step 1, mount the partition and,
while logged in as root, skip right to Step 2 and make the changes to the files
Step 2 requires.

Step 2
After following Step 1 as appropriate, type the following at the prompt:

# cd /etc (For Knoppix, first you must change directory to the partition with
your lost-password distro.)

Step 2 requires you to make changes to these two files: "passwd" and "shadow."
Type this line:

# vi passwd (This opens the file with the Vi editor.)

Next, press the I key, which places the Vi editor in Insert mode.

For more on the Vi editor, see the Vi Editor edition of Tips for Linux
Explorers.

The first line of the passwd file will probably look like this:

root:x:0:0:root:/root:/bin/bash

Carefully delete the "x" after "root:" being sure to leave the colons in place.
The first line should now read:

root::0:0:root:/root:/bin/bash

Save the file by pressing the Escape key and then typing:

ZZ

To edit the second file, type:

# vi shadow

Press the I key to place the Vi editor in Insert mode.

The first line of the shadow file is a long scrambled string of characters.
Change it to:

root:::: (That's four colons.)

Save the file by pressing the Escape key and then typing:

ZZ

Now you can reboot your computer. Log in as your normal user, open a console,
and type:

$ su
# passwd

And set the new root password. Log out as root:

Ctrl-D

And the job is done!

Congratulations! You've now reset your lost password. You should plan on never,
ever going on another extended vacation again (or getting older, or having kids,
and so forth) -- so this will never happen again. After all, there's nothing
more important than Linux. Right?

 
Answer #2    Answered On: Dec 11    

From my old Unix days which was a while ago we just booted into single
user and changed the password.

Now in Ubuntu I think you can run "sudo passwd root" and then it will
ask you for your password which will give it permission to change it.

Now the disclaimer I am still learning this system so I may be all wet.
But I am willing to learn.

 
Answer #3    Answered On: Dec 11    

http://www.linuxclues.com/articles/11.htm

A reminder that physical access precludes absolute
security from a determined mal-doer: But it raises
a question:

Is there a way to burn a password into a ROM chip?
The BIOS will usually store a boot password that can be
required before grub loads, but for desktop computers
(notebooks are different) the whole BIOS can be reset
simply by removing the mainboard battery for a while
then replacing it. Many boxes have provision to be
locked, but locks can be broken.

Does anyone know about hard-wiring a password into
a separate ROM, then requiring Linux boot to check
that address? Might there be a few unused bytes in
a video or LAN card ROM? It's not important to me
in the moment, just asking for the sake of
development of more hack-proof systems.

 
Answer #4    Answered On: Dec 11    

You can password protect the bios and the grub menu items.

setting the bios to not boot from anything but the first HDD and
password protecting bios and password protect the bootloader, the
rescue mode and old boot items using strong passwords will cover
everything but the removal of the HDD from the machine.

I think it has been noted that physical access trumps most efforts at
being totally secure.

 
Answer #5    Answered On: Dec 11    


Ok, I thought you had forgotten the "root" password. Which
I guess in Ubuntu you actually don't enter a "root" password
but are given root privileges with sudo. If you have your
load CD, can't you boot from that and mount the drive and
edit the password file removing the password there? Oh wait
in this version you can't see the password field can you?
Can you run the password command while on the live CD directed
to the main drive? Can you get to single user, in Unix you
could boot to single user on the console and not be asked for
the password and administer the system that way.
Yes, sometime during the old-timers moments I can remember
things but then again it is a pleasure watching TV now, not
that many reruns.

 
Answer #6    Answered On: Dec 11    

I still
have the problem. No CD installation here. I installed it via WUFI. And it
insisted I put in a password. I avoid passwords as much as possible but
couldn't that time and I even forgot to record it. Why does it have to have a
password anyway? Its my machine. No one else uses it. Its not a public
machine. I hate passwords! But thanks again to everyone.

 
Answer #7    Answered On: Dec 11    

I agree with personal PC's, with the CD install you get the choice. Do
you know someone who can burn you a CD? If so have them or you use their
PC and download the live image and burn an image, then boot from that
and attempt to change the password from that.

 
Answer #8    Answered On: Dec 11    

If you don't like passwords then Linux may not be for you. Security is
considered to be a top priority with Linux. This means that you need to not only
have a password but to input it anytime you make changes to the system. If you
don't want this then you should stick with Windows.

However, the benefits outweigh the annoyance factor when you consider: you have
no viruses, trojans or malware to worry about. You don't even have to run
anti-virus software if you don't want to. You can install programmes with peace
of mind that they are virus free. Your homepage does not get hijacked and you
never get things popping up when you don't expect them. This is why you give
your permission which is what the password is all about.

Your system files are kept apart from user files. There are different levels of
permissions for each. It is a whole different way of looking at computer usage.
For this reason Linux is more secure than either Vista or OS/X. It is a small
price to pay and you get used to it quickly. Most of us don't blink an eye and
when it does not ask for our permission we get annoyed.

The easiest solution to your problem is to remove Ubuntu in Windows from your
Control Panel and re-install it. This time think about your password carefully.
It should have meaning to you but not to anyone else so that it is easy to
remember. Passwords are case sensitive. They should be at least 8 characters
long and have numbers and letters. You can try to go into single mode and reset
the password but that is hard for a newbie.

See: nomi.ibnmasud.com/.../

This may make you feel a bit uncomfortable because it takes you to a command
prompt, but it should work if you feel like giving it a try. Grub is the menu
right after the Windows bootmanager which has Windows first and ubuntu second.
Right after this disappears when you choose Ubuntu from the menu, grub will
display with Ubuntu as the first item. Don't wait too long as it will begin to
boot after ten seconds or so. Just press e when it is on the first line of the
grub menu.

You should develop a method for passwords. Once you have this established then
you can use it with anything For example, you could take the first two letters
of the site or operating system plus add the month and year of your birthdate
and finish with the two last letters of your middle name. The key is to be
consistent. So a password for Ubuntu could look like UB0566rd for someone using
Ubuntu with a birthday of May, 1966 and with the middle name Richard. Notice the
use of capitals. You can mix them as long as you always mix them in the same
way. The Windows password for this person would be WI0566rd and the Gmail
password would be GM0566rd.

Using a similar method I have used the same password for years but it changes
with the site or OS and I never forget it. What I did is took a name such as a
pet name and changed it so the vowels become numbers that resemble them (I aways
use the same ones such as 1 for and zero for o) and then I append the site or
OS name to give something like this R0v3r&Ub for Rover and Ubuntu. The
possiblities are endless which is what makes passwords hard to crack.

 
Answer #9    Answered On: Dec 11    

you can by pass the pass word. It is just so you may not do some thing to mess
up the Kernel. or the rare chance of invoking a Linux virus.

ubuntuguide.org/.../Ubuntu_Edgy

 
Didn't find what you were looking for? Find more on Forgotten Ubuntu Password Or get search suggestion and latest updates.




Tagged: