this post was submitted on 24 Feb 2024
90 points (76.8% liked)

Linux

48130 readers
554 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

I recently switched to Linux (Zorin OS) and I selected "use ZFS and encrypt" during installation. Now before I can log in it asks me "please unlock disk keystore-rpool" and I have to type in the encryption password it before I'm able to get to the login screen.

Is there a way to do this automatically like with Windows or MacOS? Zorin has biometric login which is nice but this defeats the purpose especially because the encryption password is long and tedious to type in.

Also might TPM have anything to do with this?

EDIT: Based on the responses I have to assume some of you guys live in windowless underground bunkers sealed off with concrete because door locks "aren't secure against battering rams". Normal people don't need perfect encryption they just want to add an extra hurdle or two for the crackhead who steals the PC. I assumed Linux had a system similar to what Windows or MacOS has been doing for a decade but I am apparently wrong.

(page 2) 50 comments
sorted by: hot top controversial new old
[–] Pantherina@feddit.de 4 points 8 months ago

Thats how encryption works. Encryption with TPM protects against removing the drive and reading somewhere else, so I suppose it makes sense for most people.

Linux Distros have this option, Ubuntu has it now I think, but on the others its often manual setup.

Just search for "cryptsetup change to tpm"

[–] CrabAndBroom@lemmy.ml 4 points 8 months ago (1 children)

Not sure if this works with drive encryption since it comes before the OS, but could this maybe be done with a YubiKey or something like that?

That way, you can plug it in and not worry about typing the password every time, but then it's also secure if someone takes your PC? As long as you remove the key when it's off of course.

load more comments (1 replies)
[–] Bitrot@lemmy.sdf.org 3 points 8 months ago* (last edited 8 months ago)

Fedora has a good write up using Clevis, I am not sure how well Ubuntu supports it as they traditionally have been against using the TPM for security reasons. https://fedoramagazine.org/automatically-decrypt-your-disk-using-tpm2/

systemd-cryptenroll can do it very quick and easy, it’s literally about two minutes work, but Ubuntu patches out the TPM support.

Ubuntu will soon have TPM-backed full disk encryption as a standard option in the installer. Their implementation is designed to defeat most of the security implications that the naysayers bring up, except the login process is still a potential vulnerability. What you are asking about is not so far fetched as some of the comments would lead you to believe: https://ubuntu.com/blog/tpm-backed-full-disk-encryption-is-coming-to-ubuntu

[–] delirious_owl@discuss.online 3 points 8 months ago

You dont want to do that.

What's the point of encrypting something without a good passphrase? It defeats the whole purpose.

[–] init@lemmy.ml 3 points 8 months ago

If you want to do away with any protection you have with opting in to a security measure, like typing in a password, why don't you just reinstall and not select the encryption option?

Not requiring a password, or automatically entering a password to decrypt the filesystem, is essentially the same as not having encryption.

Decide which you want: Security or convenience. You cannot have both.

[–] deafboy@lemmy.world 3 points 8 months ago (1 children)

There used to be exactly what you are looking for. Encfs, and later ecryptfs could encrypt just the data in your home folder.

It was a checkbox in ubuntu installer, just like the full disk encryption today. The key was protected by the standard user password.

Unfortunately, it was deprecated due to discovered security weaknesses, and I'm not aware of any viable replacement.

[–] Pantherina@feddit.de 3 points 8 months ago (1 children)

Systemd-homed does the same. But it is quite a huge change in the system, see this thread on the Fedora Discuss

load more comments (1 replies)
[–] wispydust@sh.itjust.works 3 points 8 months ago (1 children)

This reply isn't going to be helpful to OP, but thought I might add context for others passing by.

I'm using Arch Linux with LUKS encryption and gdm. As long as my user's password is the same as the LUKS password, I only ever type my password in once.

Just saying that a MacOS-like convenience is definitely possible on Linux.

[–] flork@lemy.lol 2 points 8 months ago (2 children)

Fascinating, you don't have automatic login enabled? And I assume this is at the pre-login prompt?

load more comments (2 replies)
[–] SethranKada@lemmy.ca 2 points 8 months ago (3 children)

I think people are misunderstanding the whole point of drive encryption. It's so that if the drive is stolen or lost, you don't have to worry about it as much. I personally don't see any benefit in doing this if I have to enter a password every time I plug the damn thing in. If you're concerned about somebody stealing your laptop or desktop, the disk-encryption should be the least of your worries.

To the OC; if you happen to use GNOME, then check out the settings in the DISKS app. It has auto-unlock options in the per-drive settings. I long ago configured it so my USB is auto-unlocked upon being plugged in. Though after several system resets and such whatever I did to do that seems to no longer be visible in the GUI, I know that's how I set it up in the first place.

[–] flork@lemy.lol 2 points 8 months ago* (last edited 8 months ago) (1 children)

To the OC; if you happen to use GNOME, then check out the settings in the DISKS app. It has auto-unlock options in the per-drive settings.

Thanks so much!

EDIT: This didn't work

load more comments (1 replies)
load more comments (2 replies)
[–] Pierre@beehaw.org 2 points 8 months ago

I do not know the answer, but this got me thinking: would it be easier to set up a single login for both session and decryption if /home was on a separate partition and only /home was encrypted?

[–] Bisexual_Cookie@hexbear.net 2 points 8 months ago* (last edited 8 months ago)

as others have pointed out, you can use systemd-cryptenroll to add your tpm as a way to unlock the disk at boot, security of this should be fine if secureboot is enabled (for this to work it will need to be anyway) and a password is set for the uefi. See the archwiki entry for setup info (command is as simple as systemd-cryptenroll --tpm2-device=auto /dev/rootdrive, also the device needs to be encrypted with luks2, no idea if zorin uses that by default but you can convert luks1 to luks2 {backup ur headers first!})

[–] BCsven@lemmy.ca 2 points 8 months ago

I'm not familiar with zfs, but on an encrypred drive I got around this using crypt tab If i recall. you edit a crypt file, ftab points to it or something...sorry it was 7 years ago. But there is a way to make the OS grab the decryption password. You trade convienience for security obviously

[–] zkrzsz@hexbear.net 2 points 8 months ago

https://askubuntu.com/questions/1414617/configure-ubuntu-22-04-zfs-for-automatic-luks-unlock-on-boot-via-usb-drive

This is done via storing the unlock key in USB drive and need the USB plugged to auto unlock, see if it helps.

load more comments
view more: ‹ prev next ›