8LS Logo
GitHub

Change Disk Encryption Password under POP!_OS

I recently changed my disk encryption password. Doing so under under POP!_OS 22 is quite different from doing something similar under Windows. SO here is the rundown of how I did it:

Find out Disk Name

First of all we need to find out the disk name by starting the disk utility:

Go to the launchpad and type “Disk”: start disk util

Find out the Disk Name: test

Adding a new password

Yes, you’ve read it right. We are setting a new password. Unless your old password was leaked you can add a new password instead of replacing. By this you avoid forgetting the new password and beeing locked out.

sudo cryptsetup luksAddKey /dev/nvme0n1p3

Test 123 1231

Once you are used to the new password you can delete the old ones.

Source: Reddit

luks offers in total 8 password slots.

Checking the slot of the new password

If you want to check any of the valid passwords (incl. your new one) you can use this command:

cryptsetup --verbose open --test-passphrase /dev/nvme0n1p3

Removing the old password(s)

Once you got used to it and really want to get rid of a password you can remove that one by typing it:

sudo cryptsetup luksRemoveKey /dev/nvme0n1p3

or

sudo cryptsetup luksKillSlot /dev/nvme0n1p3

Source: AskUbuntu