Showing posts with label Recover. Show all posts
Showing posts with label Recover. Show all posts

Friday, 25 March 2016

How to Recover an Encrypted Home Directory on Ubuntu

While the home-folder encryption in Ubuntu is far from a perfect solution (there is considerable data leakage from the swap file and the temp directory - for example once I've observed the flash videos from Chromium porn private browsing mode being present in the /tmp directory), it is a partial solution nevertheless and very easy to set up during installation. However what can you do if you need to recover the data because you dismantled your system?

Credit where credit is due: this guide is taken mostly from the Ubuntu wiki page. Also, this is not an easy "one-click" process. You should proceed carefully, especially if you don't have much experience with the command line.

Start Ubuntu (from a separate install, from the LiveCD, etc) and mount the source filesystem (this is usually as simple as going to the Places menu and selecting the partition). Start a terminal (Alt+F2 -> gnome-terminal) and navigate to the partitions home directory. Usually this will look like the following:

cd /media/9e6325c9-1140-44b7-9d8e-614599b27e05/home/

Now navigate to the users ecryptfs directory (things to note: it is ecryptfs not encryptfs and your username does not coincide with your full name - the one you click on when you log in)

cd .ecryptfs/username

The next step is to recovery your "mount password" which is different from the password you use to log in (when it asks you, type in the login password used for this account - for which you are trying to recover the data). Take note of the returned password (you can copy it by selecting it and pressing Shift+Ctrl+C if you are using the Gnome Terminal)

ecryptfs-unwrap-passphrase .ecryptfs/wrapped-passphrase

Now create a directory where you would like to mount the decrypted home directory:

sudo mkdir /media/decrypted

Execute the following and type in (or better - copy-paste) the mount password you've recovered earlier

sudo ecryptfs-add-passphrase --fnek

It will return something like the following. Take note of the second key (auth tok):

Inserted auth tok with sig [9986ad986f986af7] into the user session keyring 
Inserted auth tok with sig [76a9f69af69a86fa] into the user session keyring

Now you are ready to mount the directry:

sudo mount -t ecryptfs /media/9e6325c9-1140-44b7-9d8e-614599b27e05/home/.ecryptfs/username/.Private /media/decrypted
 Passphrase:  # mount passphrase
 Selection: aes
 Selection: 16
 Enable plaintext passthrough: n 
 Enable filename encryption: y # this is not the default!
 Filename Encryption Key (FNEK) Signature: # the second key (auth tok) noted

You will probably get a warning about this key not being seen before (you can type yes) and asking if it should be added to your key cache (you should type no, since you won't be using it again probably).

That's it, now (assuming everything went right) you can access your decrypted folder in /media/decrypted. The biggest gotcha is that home/username/.Private is in fact a symlink, which - if you have an other partition mounted - will point you to the wrong directory, so you should use the home/.ecryptfs/username directory directly... If this does work you try this from this ubuntu tutorial ...

Or you can also try this Live CD method of opening a encrypted home directory

How To Recover Deleted Files From Pendrive & Memory Card

In some cases we accidentally lost our valuable data by formatting the pendrive or memory card mistakenly.  Or due to virus programs we lost our data. You can also apply password on pendrive from others. If you do not have the backup of your data and you don’t know how to recover our valuable data then do not worry because in this article we will discuss the best possible method to recover deleted files from pendrive and SD cards.
Make Money from here


                    

Methods To Recover Deleted Files From Pendrive & Memory Card.

1. Stellar Phoenix

Stellar Phoenix Download ButtonStep 1. Download Stellar Phoenix data recovery tool and install it.
Step 2. Choose drive recovery option if you want to recover drive.
Step 3. Select drive from the given list that you want to recover.
stellar phoenix data recovery interfaceStep 4. After selecting the drive you have to choose delete recovery if you want to recover deleted files.
stellar phoenix data recovery featureStep 5. Select advance option if you want to recover a formatted drive. Select drive and press scan button.
Step 6. After scanning it will give you a list of deleted files.
stellar phoenix data recovery filesStep 7. Tick the files you want to recover and press recover button.
Step 8. It will save your deleted files in the recovery folder.

2. Ease-US Data Recovery Software

EaseUs Data Recovery Software Download ButtonStep 1. Download and install Ease-US data recovery.
Step 2. Double click the icon and launch Ease-US data recovery Wizard.
Step 3. Select the types of files you want to recover. Press Next Button.
ease us pendrive data recovery interface
Step 4. Select the disk you want to recover and press Scan button.
ease us pendrive data recovery scanning
Step 5. If you lost your partition, select Lost Disk Drive and Scan to continue the recovery Process.
Step 6. After Scan you can see the list of deleted files and select those you want to recover.
Step 7. Then Click Recover button to get the files back.
ease us pendrive data recovery files selection
Back to Top