You are not logged in.

#1 2022-09-20 02:18:30

K4LCIFER
Member
Registered: 2021-10-04
Posts: 70

Can you automatically mount an encrypted drive on login?

I want to encrypt a secondary drive that I have for my system, but I don't want to have to input a password everytime that I want to use it. Can the keyring save the encryption password so that when the drive is accessed, it will be unlocked when you are logged in?

Offline

#2 2022-09-20 02:25:43

kermit63
Member
Registered: 2018-07-04
Posts: 372

Re: Can you automatically mount an encrypted drive on login?

Yes. The general process is to create and register a key file for the encrypted drive and use /etc/crypttab to automatically decrypt it during boot.

https://wiki.archlinux.org/title/Dm-cry … n#Keyfiles


Never argue with an idiot, they will drag you down to their level and then beat you with experience.
It is better to light a candle than curse the darkness.
A journey of a thousand miles begins with a single step.

Offline

#3 2022-09-20 15:09:49

3beb6e7c46a615a
Member
Registered: 2021-03-27
Posts: 165

Re: Can you automatically mount an encrypted drive on login?

If your initrd uses systems you can also use the same passphrase as for your primary disk; systemd caches passphrases and can unlock multiple devices at once if they share the same passphrase.

Offline

#4 2022-09-20 22:38:56

robotoid
Member
Registered: 2019-07-18
Posts: 15

Re: Can you automatically mount an encrypted drive on login?

Is it important that the decryption happens "on login" rather than sometime during startup?

Offline

Board footer

Powered by FluxBB