Ubuntu: How to change LUKS passphrase? (4 solutions!)
Channel: Roel Van de Paar
Date: 2019-06-28

Ubuntu: How to change LUKS passphrase?


The Question: Having installed Ubuntu 11.10 with whole disk encryption and LVM, I need to
provide a way for users to easily change LUKS passphrase.
Preferably, this should be done using GUI tools, thus, enabling novice users to
perform this basic task.

Solutions Sample (Please watch the whole video to see all solutions, in order of how many people found them helpful):

== This solution helped 41 people ==
I am not familiar with gui tool but cryptsetup is the tool to interact with
luks.
Basically AFAIK luks lets you add https://wiki.archlinux.org/index.php/
System_Encryption_with_LUKS#Adding_Additional_Passphrases_or_Keyfiles_to_a_LUKS_Encrypted_Partition
and you can do that with:
sudo cryptsetup -y luksAddKey ENCRYPTED_PARTITION
sudo cryptsetup luksRemoveKey ENCRYPTED_PARTITION
where 0 is the slot number. I guess luks stores slots as 0,1,2 etc. But I
recommend you to be very careful with luks as you may lock yourself out. Please
refer to manual of http://www.linuxcommand.org/man_pages/cryptsetup8.html. Also
I recommend you to visit other distro IRC channel just to be extra safe before
you proceed.
You may need to reboot the machine and try your new passsphrase as well before
you remove the key.
http://code.google.com/p/cryptsetup/wiki/FrequentlyAskedQuestions
EDIT: Seems like gnome-disk-utility lets you change the passphrase.
[enter image description here]
[enter image description here]

== This solution helped 15 people ==
cryptsetup luksChangeKey ＜target device＞ -S ＜target key slot number＞
This will ask you first for a valid pass-phrase (in any enabled keyslot) then
will prompt you fro the new passphrase in the target keyslot

== This solution helped 33 people ==
Tested in ubuntu 14.04: Search for the "Disks" application
Select Device, select volume, Click cogs (more actions) -＞ "Change passphrase"
[screenshot]:

With thanks & praise to God! With thanks to the many people who have made this project possible! | Content (except music & images) licensed under cc by-sa 3.0 | Music: https://www.bensound.com/royalty-free-music | Images: https://stocksnap.io/license & others | With thanks to user user1338062 (https://askubuntu.com/users/111331), user tacaswell (https://askubuntu.com/users/90960), user sagarchalise (https://askubuntu.com/users/1543), user Richard Pierre (https://askubuntu.com/users/197395), user louigi600 (https://askubuntu.com/users/221332), user guntbert (https://askubuntu.com/users/134729), user Greg Lever (https://askubuntu.com/users/697829), user ervingsb (https://askubuntu.com/users/39836), and the Stack Exchange Network (http://askubuntu.com/questions/95137). Trademarks are property of their respective owners. Disclaimer: All information is provided "AS IS" without warranty of any kind. You are responsible for your own actions. Please contact me if anything looks amiss at Roel D.OT VandePaar A.T gmail.com.