Solved Change drive encryption password

Solved issue

rdfrkian

New Member
Joined
Dec 1, 2023
Messages
23
Reaction score
26
Credits
200
Hello! :)
Using kubuntu 22.04. When I installed it about a month ago, silly me used the same passphrase for that drive encryption thing and my user account login. I know how to change my user account password, but how do I change the drive encryption password? It's the first one you enter when you boot up your laptop.
Thank ye!
 


G'day rdfrkian, Welcome to Linux.org

I just realized my mistake there....I wrote as if you had lost access !!

Welcome anyway !!

Someone here will come along, who has more experience in that situation than I do ....

Good Luck
 
You could try this. The info is a bit dated, but may still apply



Using the Disks application:​

In Ubuntu 18.04 or newer there is the possibility of using (Gnome) Disks. Thanks for the hint, Greg Lever, after clicking around I found what Greg mentioned:
  1. Open Gnome Disks.
  2. Choose/Click on the main physical hard drive in the left panel.
  3. Click on the LUKS encrypted partition, in this example it is Partition 3: Screenshot Gnome Disks
  4. Click on the edit icon (cogs, gear wheels) and choose "Change Passphrase".
If you get an error, close GNOME Disks and open it in a terminal: sudo gnome-disks
from : https://askubuntu.com/questions/109...ncrypted-lvm-system-previously-alternate-inst
 
You could try this. The info is a bit dated, but may still apply



Using the Disks application:​

In Ubuntu 18.04 or newer there is the possibility of using (Gnome) Disks. Thanks for the hint, Greg Lever, after clicking around I found what Greg mentioned:
  1. Open Gnome Disks.
  2. Choose/Click on the main physical hard drive in the left panel.
  3. Click on the LUKS encrypted partition, in this example it is Partition 3: Screenshot Gnome Disks
  4. Click on the edit icon (cogs, gear wheels) and choose "Change Passphrase".
If you get an error, close GNOME Disks and open it in a terminal: sudo gnome-disks
from : https://askubuntu.com/questions/109...ncrypted-lvm-system-previously-alternate-inst
Ah Ok, I didn't think of using the disks application. That's gnome, but the plasma version looks exactly the same. I bet that will work. I thank you, sir! :)
 
Ah Ok, I didn't think of using the disks application. That's gnome, but the plasma version looks exactly the same. I bet that will work. I thank you, sir! :)
Ok, well, there is no button to click on the disks app to change password and I looked all through it.
hmm..
 
I have now!
Looks like the add new key, test new key, delete old key method is the safest route. I'll give it a whirl in the morning. Thank you!

ok, so it worked. Here's what I did. Anyone elaborate if I miss something, please.

Did a regular backup of my data and what not.

open terminal.
input:
Code:
cryptsetup luksAddKey /dev/nvme0n1p3
It asks you to enter the current passphrase. Enter it.
It asks you to enter a new passphrase. Enter it.
It asks you to reenter the new passphrase.

If all goes well. (it can take a while to complete... 15 seconds in my case)

Reboot and test the new passphrase.
If all goes well, open terminal and enter.
Code:
sudo cryptsetup luksRemoveKey /dev/nvme0n1p3

This will remove the old key that you enter.
Reboot and test the old key to be sure it worked. Enter your new key to get logged back in.

Note your device name could be different. Mine just happened to be the same as the example linked at the top.
i.e.
Code:
/dev/nvme0n1p3
I did open the disks app on kubuntu to verify the name was the same to be sure. Easier to do that than to dump it in terminal. (just me...)

Hope this helps. Please be sure to verify all the above. I'm no expert, but it worked for me.
yay.
 
My opinion....if it works?.....it's gold !
 
Thank you !
 
Anyone elaborate if I miss something, please.

That looks fine, like how I'd have done it if it was me. I figured one of those solutions would be the one for you. There's often multiple ways to accomplish the same goal.
 

Members online


Top