Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

A friend of mine has a old Ubuntu laptop that he wants to put back into use, but since it has been some time since he used it he has forgotten his password.

I've looked up how to change but none of them will work. I have also tried using the recovery mode, but using the root mode is locked also and requires a password. (We can not reformat the disk due to some pictures on it.)

Thank you in advance! :)

share|improve this question

marked as duplicate by Wilf, Aditya, Warren Hill, terdon, Eric Carvalho Mar 19 '14 at 0:53

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Please read through this question. – Wilf Mar 17 '14 at 22:11
See this answer from Oli… – Stormvirux Mar 18 '14 at 1:16

You can boot the laptop with a live CD and chroot into the system and then change the password of any user. I have made this with the minimal installation CD from Gentoo.

  • Download this ISO image (or Ubuntu Live CD) and burn it or make boot-able USB with:

  • You need to find out the partitions on the old laptop. Assuming that you have an IDE hard drive with only root, boot and swap partitions you do this

    mount /dev/hda3 /mnt/gentoo/
    mount /dev/hda1 /mng/gentoo/boot
    swapon /dev/hda2
  • Then you need to mount proc,dev and sys

    mount -t proc proc /mnt/gentoo/proc
    mount --rbind /dev /mnt/gentoo/dev
    mount --rbind /sys /mnt/gentoo/sys
  • Then you chroot

    chroot /mnt/gentoo /bin/bash

After this you can change your password with passwd

I hope this help

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.