Default linux mint encryption of home folder - how to decrypt?

All Gurus once were Newbies
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. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
prostyler
Level 2
Level 2
Posts: 64
Joined: Wed Feb 05, 2020 5:18 pm

Default linux mint encryption of home folder - how to decrypt?

Post by prostyler »

Hi I did check to encrypt home folder (on different drive) when install mint. Now I see there are problem to decrypt it if something happened, so I decide I want to decrypt it and use veracrypt with a small container. How to decrypt home folder? What program is used to encrypt my home folder by mint?

User avatar
xenopeek
Level 24
Level 24
Posts: 24725
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Default linux mint encryption of home folder - how to decrypt?

Post by xenopeek »

Home directory encryption uses ecryptfs. It's probably easiest to just create a new user account, copy over your files from a backup and then delete the old account.

You can optionally use the "ecryptfs-setup-private --undo" command to get instructions for how to undo home directory encryption but it's basically the above with more steps that you can mess up.

If you can no longer boot into the system on which you have the encrypted home directory use the ecryptfs-recover-private or ecryptfs-mount-private command to mount the encrypted directory, as is also noted in the file you can see in the directory while it is encrypted.
Image

prostyler
Level 2
Level 2
Posts: 64
Joined: Wed Feb 05, 2020 5:18 pm

Re: Default linux mint encryption of home folder - how to decrypt?

Post by prostyler »

Thanks, I will do ASAP after repair my windows partition - I did try etcher, unetbootin to no avail (usb stick is not read properly - win install is fu$% up). I cant install weoUSB (mint 20)... Do you know any program I can use?

prostyler
Level 2
Level 2
Posts: 64
Joined: Wed Feb 05, 2020 5:18 pm

Re: Default linux mint encryption of home folder - how to decrypt?

Post by prostyler »

lol even dd is not working. How I can mount windows iso to flash under linux mint 20?

prostyler
Level 2
Level 2
Posts: 64
Joined: Wed Feb 05, 2020 5:18 pm

Re: Default linux mint encryption of home folder - how to decrypt?

Post by prostyler »

@xenopeek "copy over your files from a backup and then delete the old account." what file do I need to backup - do I just need to move home of old user to a home of new user (there is no new user name in ".ecryptfs" - so I guess hi is not encrypted)? How can I delete the main user? In "Users and Groups" I can't.

EDIT:

I have tried to create a new user, copy the OLD user home content to new user home folder. And now i want to log out old user, log in to new user and just delete old user. BUT I can't log in to a new user (pass is correct).

Code: Select all

ecryptfs-setup-private --undo
command does not work (I mean instructions are... not even close to work).

User avatar
xenopeek
Level 24
Level 24
Posts: 24725
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Default linux mint encryption of home folder - how to decrypt?

Post by xenopeek »

Let's roll back. Can you still log in to the account with the encrypted home folder? I meant: do that, then copy the files you want to keep from there to some other location (a veracrypt container if you want), then log in to a new user account you created and copy the files from that other location into this new user account then delete the old user account.
Image

prostyler
Level 2
Level 2
Posts: 64
Joined: Wed Feb 05, 2020 5:18 pm

Re: Default linux mint encryption of home folder - how to decrypt?

Post by prostyler »

Yea I can, but I don't want to do that. Setting new passwords, changing file permissions, virtual boxes, policy... etc.

I just want to decrypt the home folder, without creating a new user. It should be as easy as to encrypt it otherwise there is to much to change.

EDIT:

Hmm I have an idea - create a new user, then delete the old one. BUT after this create a new user with identical name to the old one. This should fix some work with edition... Need to check this out.

prostyler
Level 2
Level 2
Posts: 64
Joined: Wed Feb 05, 2020 5:18 pm

Re: Default linux mint encryption of home folder - how to decrypt?

Post by prostyler »

Yea it worked just fine!

However there was (before, for old - same named user) promt for password when I log in. Now there is no password, but it is fine, however there is a login screen where you need to click LOG IN - @xenopeek is there something I can do to remove this screen and log directly to system (there is no need for password to log in, however user has set it password).

EDIT: remember to sign new user to the same groups you previous user do belong! Also when you copy file from home/YOUR_USER remember to change owner of the files (chown to the new user - especially if you copy them as admin, cause the files/folder will be created with owner tag set as admin and not a NEW user) by:

sudo chown -R NEW_OWNER:NEW_GROUP /YOUR_PATH_TO_THE_FILES/FOLDERS_YOU_WANT_TO_CHANGE
(-R is for recursion - to move to another folder - if it exist, if you did change previous one - in the same folder level only)
Last edited by prostyler on Sun Jul 12, 2020 7:19 am, edited 2 times in total.

User avatar
xenopeek
Level 24
Level 24
Posts: 24725
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Default linux mint encryption of home folder - how to decrypt?

Post by xenopeek »

Is the user member of the nopasswdlogin group? You can check in Users & Groups. Users in that group don't automatically log in but can be logged in without password prompt.

To automatically log in without any action on the login screen, open Login Window from your menu and set that user to automatically log in. After your computer boots it will always log in to that user account.
Image

prostyler
Level 2
Level 2
Posts: 64
Joined: Wed Feb 05, 2020 5:18 pm

Re: Default linux mint encryption of home folder - how to decrypt?

Post by prostyler »

"After your computer boots it will always log in to that user account."

Hmmm one more question, if I have tigerVCN, on WOL (wake on lan) set up on remote computer and I turn on my computer (local one, with help of WOL) and this menu apper so I can just click to "log in" - will tigerVCN be able to load/connect to/run the computer, or will it be able to connect/run it only after login (to the desktop)?

Ideally would be to be able to connect with tigerVNC before desktop (already connected when browsing on login screen) and choose the user you wan to help to. But I think I won't be able to do that cause tigerVNC is not loaded then. I can't check this out at the moment my self, but I'm sure experienced user know if programs are loaded before login screen or after.

BTW to what groups the clean user (admin - after the mint installation) belong to?

Post Reply

Return to “Newbie Questions”