Decrypting Home Folder

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
jivannaveen

Decrypting Home Folder

Post by jivannaveen »

A problem meant I had to reinstall LM9. I copied the encrypted Home folder to an external drive and reinstalled. Now I can't find a way to decrypt those files. Please help as there is some important & urgently required files there.

I'm a totally newbie to Linux Mint, but it was love at first site.

Regards,

Jivan Naveen.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
thenewguy

Re: Decrypting Home Folder

Post by thenewguy »

Could you explain the process you used to encrypt and copy the files to the external disk? It would help to know how you got to this point.
jivannaveen

Re: Decrypting Home Folder

Post by jivannaveen »

I simply installed LM9. It asked me if I wished to encrypt the home folder with the LM password.
When I had problems I used live from and copied files to separate drive then reinstalled. Thanks.
jivannaveen

Re: Decrypting Home Folder

Post by jivannaveen »

Does any one now. I can't boot up Linux Mint so I'm using the Live CD. I see the folder where my files are held in the previous installation but they're encrypted. How do I get them back? Please help as some of the files are required urgently.
conslie

Re: Decrypting Home Folder

Post by conslie »

Just a novice here, but if not yet, try right-click and see if anything there is obviously helpful. If not +open as administrator" might be one. Choose that and use the PW you used when installing LM. Just a guess, but good luck.
jivannaveen

Re: Decrypting Home Folder

Post by jivannaveen »

All I get is a readme file and an "access your private" .desktop link. Thanks for the try.
jivannaveen

Re: Decrypting Home Folder

Post by jivannaveen »

I tried the process described in the link without success. I should mention that the files are on a separate drive. I can access the drive if I use "open as admin" though there is one folder called "FOLDER" and within that are folders and files with, what look like, encrypted names.

Originally the files were in the main route. After having problems I copies them to a separate drive and then reinstalled LM9.

Please remember I'm a noobie.

Thanks
alpha1

Re: Decrypting Home Folder

Post by alpha1 »

I guess this would also serve as a lesson to you that donot encrypt files/folders unless reallt required.
eg in a multi user setting
User avatar
JoeFootball
Level 13
Level 13
Posts: 4673
Joined: Tue Nov 24, 2009 1:52 pm
Location: /home/usa/mn/minneapolis/joe

Re: Decrypting Home Folder

Post by JoeFootball »

jivannaveen wrote:Does any one now. I can't boot up Linux Mint so I'm using the Live CD. I see the folder where my files are held in the previous installation but they're encrypted. How do I get them back? Please help as some of the files are required urgently.
I found this section of an interesting article in Linux Magazine. Hope it helps.

Joe
User avatar
JoeFootball
Level 13
Level 13
Posts: 4673
Joined: Tue Nov 24, 2009 1:52 pm
Location: /home/usa/mn/minneapolis/joe

Re: Decrypting Home Folder

Post by JoeFootball »

alpha1 wrote:I guess this would also serve as a lesson to you that donot encrypt files/folders unless reallt required.
eg in a multi user setting
I don't know about the lesson, but a more applicable example would be laptops, where the computer often exists out of a secure location.

Joe
alpha1

Re: Decrypting Home Folder

Post by alpha1 »

Yeah, I got it.
Unfortunately I had also encrypted my home, and borked the system (via nvidia driver install).
Rendering everything completely useless.

Ultimately I had to use Live CD to boot and recover the home.

I remember doing google search, and following instructions as given.

Code: Select all

Recovering Your Data Manually
These steps should only be required in unusual, or emergency circumstances, when you must manually mount your encrypted ~/Private directory to recover your data. You can use this to mount your data if it's backed up on a different system, or using a LiveCD, as long as it is running at least the Linux 2.6.26 kernel.

If you use encrypted filenames (standard in Ubuntu >= 9.04) you have to do the following first:
 sudo ecryptfs-add-passphrase --fnek 
 Passphrase:  (Enter the mount passphrase you recorded when you setup the mount--this passphrase is different from your login passphrase.)
You should now get two lines looking like this:
 Inserted auth tok with sig [9986ad986f986af7] into the user session keyring 
 Inserted auth tok with sig [76a9f69af69a86fa] into the user session keyring  (write down the second value in the square brackets)
Mount using sudo:
 sudo mount -t ecryptfs /home/username/.Private /home/username/Private 
 Selection: 3  (use a passphrase key type)
 Passphrase:  (Enter the mount passphrase you recorded when you setup the mount--this passphrase is different from your login passphrase.)
 Selection: aes  (use the aes cipher)
 Selection: 16  (use a 16 byte key)
 Enable plaintext passthrough: n 
 Enable filename encryption: y  (This and the following options only apply if you are using filename encryption)
 Filename Encryption Key (FNEK) Signature:  (the value you wrote down from the second line above)
Assuming you entered your passphrase correctly, you should be able to temporarily access your data at  /home/username/Private . Since you are using superuser privileges instead of your regular user account, you may get a warning that you might have entered the passphrase wrong, even if you didn't:


WARNING: Based on the contents of [/root/.ecryptfs/sig-cache.txt],
it looks like you have never mounted with this key
before. This could mean that you have typed your
passphrase wrong.
It is safe to ignore this warning.
alpha1

Re: Decrypting Home Folder

Post by alpha1 »

IMO, using true crypt is MUCH easier and compatible among any system - Windows/Mac/Linux.
So you can use any OS to recover your data, as long as true crypt is installed somewhere.
Locked

Return to “Beginner Questions”