[CentOS] change LUKS filesystem password

Thu Aug 11 21:35:52 UTC 2011
Paul Heinlein <heinlein at madboa.com>

On Thu, 11 Aug 2011, ken wrote:

> How do you change the LUKS filesystem password?

[Caveat: this is sort of from memory; I don't have a luks-encrypted 
device handy for testing...]

First, add a second key (password):

   cryptsetup luksAddKey /dev/XXX

Then delete the original key

   cryptsetup luksKillSlot /dev/XXX 0

You need to be careful to get the slot numbers correct. Use the 
luksDump option to see how things are setup on your system.

-- 
Paul Heinlein <> heinlein at madboa.com <> http://www.madboa.com/