Until data wasn't lost I could login and use OS as normal and access my home folder without entering any passphrase because it was automounted at login.

Now I want to access my home folder just by entering the login password as I always did when logging in.But I cant login anymore..

So how to access my home folder only knowing the login password?

In reply to Jo-Erlend Schinstad:

My situation is I cant login anymore because several system files have been corrupted due to usb problems.So I must use another OS and because I don't know my mount passphrase I must somehow access valuable files knowing only my login password.

  • Also I have to use Parted Magic Live CD because that's my only option... – user263552 Mar 30 '14 at 10:43
  • Can you explain a little more detailed what the situation is? You may be in for some bad news. – Jo-Erlend Schinstad Mar 30 '14 at 12:35
  • @Jo-ErlendSchinstad ok I explained more.Anything else you want to know about? – user263552 Mar 30 '14 at 13:11

several system files have been corrupted due to usb problems

This may or may not be a significant problem for you.

To decrypt the contents of an encrypted home, Ubuntu normally needs not only the login password but also a "mount passphrase" - a secret, long secure string that was probably generated automatically for you at the time of setting up your encrypted home.

If your system can boot normally it will already have the mount passphrase in a "wrapped" format stored on the drive, and will only need your login password to complete the decryption. However if your system becomes corrupted and you need to recover files from another OS (such as a Live CD) then you will need this mount passphrase as well as your login password. So if this mount passphrase is part of your system that has become corrupt, and you didn't take a backup of it, you may be completely out of luck.

Nonetheless, it's possible that the wrapped version of the passphrase may still be on your drive somewhere an will have survived corruption, in which case you're in luck.

This page details how to recover files on an encrypted home from an Ubuntu Live CD.


It involves using a helper tool:

sudo ecryptfs-recover-private

This will try to find all the encrypted home directories on the system and their corresponding wrapped mount passphrases. If it does, all you will need to decrypt them will then be your login password.

If it doesn't find a surviving wrapped mount passphrase, and you don't have a backup of it, you are likely to be out of luck.

It it does work, it will temporarily mount the decrypted contents into a mount point inside /tmp. Then you should copy the decrypted files from there onto another device. See the whole article for more information.

Note: to anybody wanting avoid this problem, if you set up an encrypted home directory make sure you save a backup of the mount passphrase somewhere. You may be prompted to do this when you first set up the encrypted home, but if not you can access it later - after you've successfully logged in - with the command ecryptfs-unwrap-passphrase. This will only work if you've logged in normally on the system - that is, it won't work when you need to recover as in this OP's situation.

  • Thanks Ill write back and upvote you as soon as it works but I'm currently downloading Ubuntu iso and I'm just wondering: Can I do this in Parted Magic Live CD? (it says command not found :( ) – user263552 Mar 30 '14 at 14:26
  • It looks like Parted Magic LiveCD doesn't contain any ecryptfs tools (I checked here). I'm not familiar with Parted Magic Live CD though. – thomasrutter Mar 30 '14 at 14:57
  • @neon_overlord unfortunately the download was cancelled because it says not enough disk space even though I have 2GB available RAM.This should be because 1GB is used as cache.. how can I free RAM so I can download the whole image? – user263552 Mar 30 '14 at 14:58
  • If you are limited in space because you booted from another Live CD, then you could download one of the minimal install Ubuntu CD images that are only 30MB which work by loading installed packages from a live mirror. You could then use this to install Ubuntu onto a USB stick or something (careful not to overwrite hard drive). – thomasrutter Mar 30 '14 at 15:02
  • Or you can use the Ubuntu 12.04 (precise) live CD which is less than 700MB and therefore actually fits on a CD. – thomasrutter Mar 30 '14 at 15:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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