I have forgotten the password to log in to Ubuntu (15.10). My home folder is encrypted. I do have the passphrase. How should I change the user password? There are some procedures here but they do not mention if there is any difference if your home directory is encrypted. How to proceed?
Asked
Active
Viewed 1,225 times
1 Answers
0
You can try the following:
boot the pc with a live-cd or live-usb
mount the filesystem you lost the password from and chroot into it. from a terminal:
cd /media mkdir tmp sudo mount /dev/sda1 /media/tmp sudo chroot /media/tmp /bin/bash
/dev/sda1
is an example. change it to where your file system is if necessary.now reset the password from the user you lost the password from
sudo passwd username
unmount
sudo umount /media/tmp
Hope this helps.

Byte Commander
- 107,489

drizzle
- 51
-
Thanks but in the scenario you describe, I wouldn't use the passphrase at all. If this would work, it would mean anyone could bypass the encryption by just mounting the drive from a live USB... that shouldn't be possible, right? – Frances Jessica Taylor Jan 09 '16 at 06:36
-
You don't need to decrypt your home folder to change your linux password. It will allow you to log in again and then you can use the passphrase to decrypt the home folder. – drizzle Jan 09 '16 at 15:04
sudo passwd username
) without knowing the old account password, and then recovering the encrypted home directory with the known encryption passphrase using thesudo ecryptfs-recover-private /home/user
command. – Byte Commander Jan 10 '16 at 14:26