haase.dev/ blog

Change Passphrase with Cryptsetup

September 26, 2020

You could change your passphrase within one step with the luksChangeKey command, but if you want to make sure you made no typo, I would prefer to use two steps.

First add a new passphrase to your volume.

cryptsetup luksAddKey /dev/<device>

Then remove your previous passphrase.

cryptsetup luksRemoveKey /dev/<device>

Source: https://wiki.archlinux.org/index.php/Dm-crypt/Device_encryption#Key_management