LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 07-01-2014, 02:49 PM   #1
linustalman
LQ Guru
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 12 Bookworm
Posts: 5,714

Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
Question Questions on home folder and full drive encryption.


Hi.

I have a few questions on home folder (ecryptfs) and full drive encryption (luks).

1. Can I use a seperate home, root and swap partitions even if I use LUKS encryption?

2. Can LUKS be used without LVM? I tried selecting just LUKS but LVM insisted on being checked also at installation (Ubuntu distro).

3. LUKS is said to be difficult to use but I set it up in VirtualBox and had to just select LUKS + LVM and enter a passphrase - sounds simple enough.

4. If I disable recovery mode in Ubuntu, is .ecryptfs safe from cracking? This is concerning: http://ubuntuforums.org/showthread.p...5#post12445165

Last edited by linustalman; 07-01-2014 at 02:52 PM.
 
Old 07-01-2014, 04:45 PM   #2
gengisdave
Member
 
Registered: Dec 2013
Location: Turin, Italy
Distribution: slackware
Posts: 328

Rep: Reputation: 74
Quote:
Originally Posted by LinusStallman View Post
Hi.

I have a few questions on home folder (ecryptfs) and full drive encryption (luks).

1. Can I use a seperate home, root and swap partitions even if I use LUKS encryption?
Yes, you can, but you have to input a different key for every partition.

Quote:
2. Can LUKS be used without LVM? I tried selecting just LUKS but LVM insisted on being checked also at installation (Ubuntu distro).
As in point 1, LUKS can be used separately from LVM; unless Ubuntu forces you to use them together, you can choose.

Quote:
3. LUKS is said to be difficult to use but I set it up in VirtualBox and had to just select LUKS + LVM and enter a passphrase - sounds simple enough.
Yes, it is simple, save or write down for the future the sequence of the command used to create the system, as you won't use it more often.

Quote:
4. If I disable recovery mode in Ubuntu, is .ecryptfs safe from cracking? This is concerning: http://ubuntuforums.org/showthread.p...5#post12445165
I do not know how ecryptfs works, but even without recovery mode, I can boot your pc from a live distro and steal your key. I repeat, I don't know ecryptfs at all, but a crypt program who stores a clear key must not be used.

BTW, main unlock system in LUKS is the passphrase, but you can use a keyfile e.g. stored in a pendrive that you always carry with you (ok, it's too much spy-movie).
 
Old 07-02-2014, 01:59 PM   #3
linustalman
LQ Guru
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 12 Bookworm
Posts: 5,714

Original Poster
Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
Hi gengisdave.

Thanks for your help.

5. If I used LUKS - would auto-login be fine? Since if LUKS is there, then anyone who breaks that should be able to break through any login password?

6. So if someone was to use LUKS, they'd realistically stay with a boot partition and a root partition with no separate home or swap partition?

Last edited by linustalman; 07-02-2014 at 02:01 PM.
 
Old 07-02-2014, 02:42 PM   #4
gengisdave
Member
 
Registered: Dec 2013
Location: Turin, Italy
Distribution: slackware
Posts: 328

Rep: Reputation: 74
LUKS is totally "invisible" to system, once I want to mount an encrypted partition/volume, it asks for a passphrase, then it works normally.

To protect your data, you must encrypt your /home directory/partition (or wherever you data are placed). That doesn't prevent to steal/change you login password, as it's held in /etc/passwd - /etc/shadow. Then you must encrypt / partition. That means two (at least) LUKS partitions with two different passphrases. With the swap area we have three different passphrases (it could be the same but you must enter it thrice).

LVM comes in help, you create a volume, crypt it with LUKS and create several partitions inside it. Many partitions, one key.

This link is a guide written by Alien Bob to setup the encryption in Slackware, the logic under the hood is the same for every Linux.

ftp://ftp.slackware.com/pub/slackwar...ADME_CRYPT.TXT

I use it on my laptop, after about 5 seconds after kernel boot, it asks for the passphrase, then it continues booting. No passphrase, no kernel boot nor partitions access. Even if someone take my hdd, there are 100MB of /boot (just kernels) on a top of unreadable data.

Last edited by gengisdave; 07-02-2014 at 02:45 PM.
 
Old 07-02-2014, 02:50 PM   #5
linustalman
LQ Guru
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 12 Bookworm
Posts: 5,714

Original Poster
Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
Question

Quote:
Originally Posted by gengisdave View Post
LUKS is totally "invisible" to system, once I want to mount an encrypted partition/volume, it asks for a passphrase, then it works normally.

To protect your data, you must encrypt your /home directory/partition (or wherever you data are placed). That doesn't prevent to steal/change you login password, as it's held in /etc/passwd - /etc/shadow. Then you must encrypt / partition. That means two (at least) LUKS partitions with two different passphrases. With the swap area we have three different passphrases (it could be the same but you must enter it thrice).

LVM comes in help, you create a volume, crypt it with LUKS and create several partitions inside it. Many partitions, one key.

This link is a guide written by Alien Bob to setup the encryption in Slackware, the logic under the hood is the same for every Linux.

ftp://ftp.slackware.com/pub/slackwar...ADME_CRYPT.TXT

I use it on my laptop, after about 5 seconds after kernel boot, it asks for the passphrase, then it continues booting. No passphrase, no kernel boot nor partitions access. Even if someone take my hdd, there are 100MB of /boot (just kernels) on a top of unreadable data.
So I could choose LUKS + LVM in a fresh HDD and then later (after installation) choose these partitions (root, home, swap) and still just use a single passphrase?

Is LUKS safe from crackers even if they use recovery mode or a live CD/USB? It sounds like .ecryptfs is not much better than no encryption.

Would the security in these scenarios be about the same?
(a) LUKS setup with a login password.
(b) LUKS setup with auto login password. (this would be very handy and secure at the same time)

Last edited by linustalman; 07-02-2014 at 02:52 PM.
 
Old 07-02-2014, 03:24 PM   #6
gengisdave
Member
 
Registered: Dec 2013
Location: Turin, Italy
Distribution: slackware
Posts: 328

Rep: Reputation: 74
Yes, every Linux (almost every) can help you in the configuration of luks/lvm, otherwise you have to set it up manually (before partitioning). LUKS provides a block level encryption, like TrueCrypt does, no way to decode data without passphrase.

Once the passphrase is provided, the partitions are "unlocked" and the system works normally. In both of your scenarios, the login is made after you unlocked the drive (automatically or not), so the security is the same.
 
Old 07-03-2014, 08:23 AM   #7
linustalman
LQ Guru
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 12 Bookworm
Posts: 5,714

Original Poster
Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
Sorry gengisdave, I asked a few questions that you had answered in a previous post. You have been very informative. Thanks.
 
Old 07-08-2014, 02:36 PM   #8
linustalman
LQ Guru
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 12 Bookworm
Posts: 5,714

Original Poster
Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
So I've got LUKS installed in a test VirtualBox VM. How would I make seperate partitions whilst keeping the single passphrase to bootup?
 
Old 07-08-2014, 05:32 PM   #9
gengisdave
Member
 
Registered: Dec 2013
Location: Turin, Italy
Distribution: slackware
Posts: 328

Rep: Reputation: 74
I suggest again this guide

ftp://ftp.slackware.com/pub/slackwar...ADME_CRYPT.TXT

jump to "Combining LUKS and LVM" but read all the document for completeness.

Fast mode: create a little partition for /boot; create the big partition; encrypt it with luks; mount and create a lvm inside it; create lvm partitions (at least / and swap); install linux as usual;

I don't know if Mint has an easier way to do this (I've seen it offers to encrypt home folder but I've never tried it) so I fear you have to do this on a terminal.

ADD: depending on the kernel installed, you have to build an initrd, or you'll get a kernel panic

Last edited by gengisdave; 07-08-2014 at 05:34 PM.
 
Old 07-09-2014, 08:45 AM   #10
linustalman
LQ Guru
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 12 Bookworm
Posts: 5,714

Original Poster
Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
Quote:
Originally Posted by gengisdave View Post
That looks way too tricky. I will stay with the default LUKS/LVM setup. Thanks gengisdave.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Full disk encryption - changing main drive chris.j Slackware 5 05-03-2014 03:23 AM
Full-drive encryption for UEFI drives Ulysses_ Linux - Security 4 11-02-2013 08:30 PM
Home Folder Encryption with ecryptfs imayneed Linux - Software 3 09-24-2012 05:05 PM
[SOLVED] How to easy set up encryption on existing data - home folder? infoslaw Linux - Newbie 5 02-12-2012 09:34 AM
[SOLVED] Home folder full EDDY1 Debian 8 12-27-2010 04:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 06:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration