0

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! :)

2

1 Answer 1

2

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:

    http://distfiles.gentoo.org/releases/amd64/autobuilds/current-iso/install-amd64-minimal-20140313.iso

  • 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

Not the answer you're looking for? Browse other questions tagged .