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,220 times
1
-
Thanks but please note: I **do** have the passphrase so my question is quite different. – Frances Jessica Taylor Jan 09 '16 at 06:34
-
1Did you read the answer? It says *"In order to get in to the encrypted home directory now, you will need one of the following: - the old login password for the account. - **the mount passphrase** used when you set up the encrypted home directory (you would have been told to write this down somewhere)."* So you can perform an administrative password change on that account (`sudo passwd username`) without knowing the old account password, and then recovering the encrypted home directory with the known encryption passphrase using the `sudo ecryptfs-recover-private /home/user` command. – Byte Commander Jan 10 '16 at 14:26
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/sda1is 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 usernameunmount
sudo umount /media/tmp
Hope this helps.
Byte Commander
- 105,631
- 46
- 284
- 425
drizzle
- 51
- 3
-
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