Skip to content

Instantly share code, notes, and snippets.

@iAnatoly
Last active May 12, 2022 21:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iAnatoly/50ebe748d048e910bcefc1caa7508141 to your computer and use it in GitHub Desktop.
Save iAnatoly/50ebe748d048e910bcefc1caa7508141 to your computer and use it in GitHub Desktop.
Change Luks password

First, find out which is the encrypted LVM partition

cat /etc/crypttab

To add a new password, use luksAddKey:

sudo cryptsetup luksAddKey /dev/sda3

To remove an existing password, use luksRemoveKey:

sudo cryptsetup luksRemoveKey /dev/sda3

View currently used slots of the encrypted partition:

sudo cryptsetup luksDump /dev/sda3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment