You can use sudo cryptsetup luksChangeKey <device>
to change the passphrase. If you want to be 100 % safe you can use sudo cryptsetup luksAddKey <device>
to add a new passphrase and after you check that everything works you can remove the old passphrase with sudo cryptsetup luksRemoveKey <device>
(it will ask for passphrase and remove keyslot associated with the passphrase you provide; be careful with this command if you remove the last keyslot you currently have, it will make your disk inaccessible).
You can use lsblk -f
to identify the correct device, look for device (partition) with fstype crypto_LUKS
, example:
nvme0n1
├─nvme0n1p1 vfat FAT32
├─nvme0n1p2 ext4 1.0
└─nvme0n1p3 crypto_LUKS 2
So here you would use sudo cryptsetup luksChangeKey /dev/nvme0n1p3
.