Choose style:

Author Topic: How to create an encrypted password protected folder in Peppermint 6  (Read 2832 times)

0 Members and 1 Guest are viewing this topic.

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 22924
  • Karma: 2556
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Have you got any files you need to keep private ?

Let's say your Laptop or Netbook is lost/stolen .. your login password isn't much protection and is quite easily bypassed by anyone with local access.

An encrypted home folder is an option (and is offered during installation), but having the WHOLE home folder encrypted can make troubleshooting a lot of login issues nearly impossible, so it's not for everyone..

So how would you like a password protected and encrypted FOLDER in your home folder where you can save JUST your sensitive files ?

Cryptkeeper is a Linux system tray applet that manages encrypted folders. It utilises EncFS which is a FUSE-based encrypted file system, which transparently handles encryption/decryption.

OK, first to install cryptkeeper .. open a terminal and run:
Code: [Select]
sudo apt-get install cryptkeeper
then to make cryptkeeper autostart at login, run:
Code: [Select]
mkdir -v ~/.config/autostart
(don't worry if that last command fails, it just means the directory already exists .. just carry on below)
then:
Code: [Select]
cp -v /usr/share/applications/cryptkeeper.desktop ~/.config/autostart/cryptkeeper.desktop
Now log off/on (or reboot)

You'll now see a new Cryptkeeper icon in your system tray (by the clock).

Click the Cryptkeeper system tray icon, and select "Preferences"

Change -

File browser: nautilus

to

File browser: nemo

and click the "Close" button.

Click the Cryptkeeper icon again and you'll be presented with a menu like this:-


Select "New encrypted folder" .. and you'll be presented with this dialog:-


Select your home folder in the right hand column, and enter a name for your new encrypted folder (I've called mine "Encrypted" in the above screenshot), then click the "Forward" button.

You''ll the be presented with this dialog asking for a password for the Encrypted folder


Enter the password you want to use (twice) and click the "Forward" button.

That's it .. you're done :)

You'll now find a folder (in your home folder) called whatever name you chose .. it will appear to work as any other folder (encryption/decryption will be totally transparent)

BUT

When you reboot, that folder won't even by visible in your home directory until you click the system tray icon and select the folder
(shown as the top option here):-


then enter the password you chose when prompted.

Only then does the encrypted folder appear (clicking it again will unmount the encrypted folder and it will disappear from your home folder until you select it again)

Any data you keep in there should be safe if your PC is stolen because the thief won't have the password to access the folder .. but .. DO NOT FORGET YOUR PASSWORD ;)

If you forget your password, don't come moaning to us .. we CANNOT help you recover the data from an encrypted folder .. that's kinda the whole point ;)



It would be a VERY good idea to back up your:-
/home/<username>/.Encrypted_encfs/.encfs6.xml
file to another PC/NAS/USB stick .. this configuration file contains your volume key in encrypted format.

It will NOT help you if you forget your password (both the volume key and master key/password are required to decrypt), but it may help if the original ever becomes corrupt.



The
/home/<username>/.Encrypted_encfs
directory also contains the files you put in your encrypted folder in encrypted format, with gibberish names like tosZ0KcKOoJPn7GDV0Ni11PP



More info, including things like how to backup an encrypted folder can be found here:
https://wiki.archlinux.org/index.php/EncFS

Backing up the entire directory is as simple as copying the entire
/home/<username>/.Encrypted_encfs
directory .. again, it won't help you if you forget the password.
« Last Edit: September 16, 2015, 10:07:24 am by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec