[dm-crypt] Add new key from a variable

Sven Eschenberg sven at whgl.uni-frankfurt.de
Fri Dec 26 07:49:40 CET 2014


Hi,

You could use STDIN to pipe the value of $var into cryptsetup, if that
fits your needs. See man page on password processing to make sure you
don't hit any surprises.

Regards

-Sven


On Fri, December 26, 2014 03:47, Jian-Ming Zheng wrote:
> 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
> _______________________________________________
> dm-crypt mailing list
> dm-crypt at saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt
>




More information about the dm-crypt mailing list