Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I use Windows 7 as my secondary OS and it has an option for creating Password reset disk i.e. a flash drive when inserted to a locked Win 7 (in case password is forgotten), would reset the system password and open the system for the user. Is it possible to make something like that for ubuntu 11.10????

share|improve this question
add comment

2 Answers 2

up vote 3 down vote accepted

Actually, there's no need for a separate disk, you just boot into recovery mode and do it from there.

  1. If you don't see grub at boot time then hold down the shift key as the machine starts, and the text-based menu should pop up before the ubuntu logo. If you do see grub (if you have a dual-boot setup you normally will) then ignore this step.

  2. Select the top-most 'Recovery mode' option. The machine will boot to a coloured text-mode 'Recovery Menu'.

  3. Select 'remount'. Hit enter when it's done.

  4. Select 'root'.

  5. Set the password with passwd <username>.

  6. reboot

Seems insecure right? This is why you should encrypt your user account if you care that much.

share|improve this answer
    
cant i do it if my /home is encrypted? what if i need to change psw of encrypted account? –  kernel_panic Dec 1 '11 at 16:37
    
You can change the log in password of an encrypted account just the same as any other. What you can't do is change the decryption password. Normally the two are the same, and the system automatically logs you an and starts decryption at the same time - I'm not sure what happens if they're not the same. If you forget your decryption password then you're stuck - there's no way in without it. –  ams Dec 2 '11 at 9:19
add comment

This can usually be done from the live cd. All you have to do is boot from the live cd and run these commands, adjusting for your system:

sudo mkdir /mnt/ubuntu
sudo mount /dev/sdXY /mnt/ubuntu
sudo chroot /mnt/ubuntu
passwd <insert-username>
exit
sudo umount /mnt/ubuntu

Now reboot into your installed system and your password will be changed to what you entered in the passwd command's prompts.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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