In this example we will encrypt home directory for user user1. This procedure should work on any Ubuntu system or similar platform like Linux mint. We will need to have administrator user besides user1 to complete the encryption.
1. Create admin user user2
2. Install necessary software if its not yes installed
sudo apt-get install ecryptfs-utils cryptsetup
3. Start encription process
sudo ecryptfs-migrate-home -u user1
Ones completed you will get following message.
Some Important Notes!
1. The file encryption appears to have completed successfully, however,
user1 MUST LOGIN IMMEDIATELY, _BEFORE_THE_NEXT_REBOOT_,
TO COMPLETE THE MIGRATION!!!
2. If user1 can log in and read and write their files, then the migration is complete,
and you should remove /home/user1.xxxxxx.
Otherwise, restore /home/user1.xxxxxx back to /home/user1.
3. boris should also run 'ecryptfs-unwrap-passphrase' and record
their randomly generated mount passphrase as soon as possible.
4. To ensure the integrity of all encrypted data on this system, you
should also encrypt swap space with 'ecryptfs-setup-swap'.