Difference between revisions of "Lost Password"

From FreekiWiki
Jump to navigation Jump to search
(more spelling)
(Added outside link)
Line 2: Line 2:
  
 
Generally it is easiest if the adopter brings the box in, but alternatively you can walk the adopter through the following:
 
Generally it is easiest if the adopter brings the box in, but alternatively you can walk the adopter through the following:
 +
Alternatively you can use the instructions [http://www.howtogeek.com/howto/linux/reset-your-forgotten-ubuntu-password-in-2-minutes-or-less/ | here]
  
 
==GRUB method==
 
==GRUB method==

Revision as of 15:00, 5 February 2010

The following applies to most linux boxen. It can be used to recover a lost root password and is also called "rooting" the box. It can be used on an Ubuntu box (which has no root password) to recover the user password.

Generally it is easiest if the adopter brings the box in, but alternatively you can walk the adopter through the following: Alternatively you can use the instructions | here

GRUB method

Edit the grub boot commands.

  1. start the computer booting up
  2. After a few (or 10 or 20) seconds you will see a screen that says... Grub Loading...3..2..1.
  3. During this screen, quickly press Esc, to go to the grub menu
  4. Next you will see several lines that start with Ubuntu, kernel 2.6..., this is the GRUB menu. hit the down arrow key as soon as you see this menu, it should select an option that ends with "recovery mode".
  5. Make sure that the recovery mode option is highlighted and press enter.
  6. This will bring up a menu with 4 options: resume, dpkg, root, and xfix
  7. select "root" from this menu
  8. You will be given a line at the bottom of the screen that should say root@freekbox:~#
  9. at this prompt, enter "passwd yourusername" (replace yourusername with the username you're trying to reset, or "oem" if it has not been changed.
    If you don't know the accounts username you can type "ls /home" for a list of all accounts on the computer.
  10. It will request that you enter a new password, and then once more to confirm. The screen will not show input as you are typing.
  11. once you enter your new password it should tell you "passwd: password updated successfully"
  12. type exit to go back to the recovery menu, then select resume to continue booting.

live CD method

If the box does not use grub to boot, one can boot the box using a live cd, a rescue floppy, or a Toms Root Boot disk, then login as root and proceed as above.

  1. "mount /dev/hda3 /mnt"
  2. "chroot /mnt"
  3. "passwd"
  4. change password
  5. "sync"
  6. reboot

The procedure can be used for distributions other than the freekbox2 or 3, but you first need to determine the name of the root partition for the mount command.

For Macs

For Mac computers at the yaboot prompt enter:

Linux rw init=/bin/bash

Once you get to the # prompt you will need to reset the terminal

reset

Now check the username

ls /home

and reset the users password

passwd usernamehere