* [dm-crypt] luksAddKey one liner
@ 2020-09-10 22:30 Frederick Gotham
0 siblings, 0 replies; only message in thread
From: Frederick Gotham @ 2020-09-10 22:30 UTC (permalink / raw)
To: dm-crypt
Let's say you create a new volume as follows:
echo -n pass0 | cryptsetup luksFormat /dev/sda2 -
So the password in keyslot #0 is "pass0".
Next, you want to set the password in keyslot #1 to "pass1", well I figured out how to do it with a one-liner:
echo -n "pass0pass1" | cryptsetup luksAddKey --key-file /dev/stdin --keyfile-size 5 --key-slot 1 /dev/sda2 /dev/stdin
Frederick
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-09-10 22:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-10 22:30 [dm-crypt] luksAddKey one liner Frederick Gotham
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).