Keyscript for ubuntu to unlock a luks partition with a keyfile and fallback to a passphrase
Hi there fine folks,
I just installed a new Ubuntu 20.04 server and it's working like a charm after some tweaking. It's a RAID 1 setup with encrypted / and unencrypted /boot. I'm able to use a keyfile on an USB drive to unlock the root partition, but if the drive isn't present it doesn't revert to asking for a passphrase. I would like to be able to have the system fallback on a passphrase after a timeout or something. I've seen some posts on the internet where people made functioning keyscripts to deal with this issue. Most of them are a bit dated. Does anyone in here have a good keyscript up and running that checks for the keyfile and reverts back to a passphrase if the key is not present? A reference to a relevant thread would also suffice, since I don't want to take up too much of all our precious times.
Kind regards,
Laurens
|