[dm-crypt] Add new key from a variable

Jian-Ming Zheng jmzheng at gmail.com
Fri Dec 26 03:47:30 CET 2014


Hi,

I want to write a script to add a new key to LUKS device /dev/sda2. As
I know, I can set the new key in a key file (for example,
new-key-file) and use the key file in the option. For example,

$ cryptsetup luksAddKey /dev/sda2 new-key-file

Can I add a new key from a variable defined in my script (for example,
$newkey) instead of using a key file?

Thanks


More information about the dm-crypt mailing list