You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/password.md
+57-7Lines changed: 57 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Change User Password
2
+
title: Change User Password and LUKS Passphrase
3
3
description: >
4
4
Forgot your main password? Locked out of your computer? Need to change your encryption passphrase? Follow these instructions to change both!
5
5
keywords:
@@ -18,25 +18,27 @@ section: software
18
18
tableOfContents: true
19
19
---
20
20
21
+
## Changing user password
22
+
21
23
If you can't log into your computer, you can follow these instructions to reset the password for any user. Pop!_OS and Ubuntu allow for the root user to reset the password for any user account. In order to get to the root user, we need to restart the computer and use what's called "single user mode", which is the low level repair system for the computer.
22
24
23
-
## Pop!_OS 18.04 and Later
25
+
###Pop!_OS 18.04 and Later
24
26
25
27
On a fresh install Pop!_OS 18.04 and later, <u>systemd-boot</u> is used rather than <u>GRUB</u>. Please follow these instructions to reset your password. If your operating system is anything other than Pop!_OS 18.04 and later, please use the [GRUB](#grub) section.
26
28
27
29
First, bring up the <u>systemd-boot</u> menu by holding down <kbd>SPACE</kbd> or the <kbd>ESC</kbd> key. On the menu, choose **Recovery Mode**.
Once the recovery operating system boots, close out of the installation window or choose **“try demo mode”**(be sure not to choose any install or repair options, as this could result in data loss).
33
+
Once the live disk boots move to a new workspace, to do this on Ubuntu use the Activities button in the top left and on Pop!\_OS use the Workspaces button in the top left (be sure not to choose any install or repair options in the installer window, as this could result in data loss).
32
34
33
-
## Ubuntu
35
+
###Ubuntu
34
36
35
37
If you are using Ubuntu we can boot from a live disk and [here](/articles/live-disk) are instructions for creating the live disk. Once the live disk has been created refer to this [article](/articles/boot-menu) for booting from the live disk.
36
38
37
-
## Mounting the Installed OS
39
+
####Mounting the Installed OS
38
40
39
-
Press <kbd><font-awesome-icon:icon="['fab', 'pop-os']"></font-awesome-icon></kbd>/<kbd><font-awesome-icon:icon="['fab', 'ubuntu']"></font-awesome-icon></kbd>+<kbd>T</kbd> to open a terminal, and type in these commands:
41
+
On Pop!\_OS press <kbd><font-awesome-icon:icon="['fab', 'pop-os']"></font-awesome-icon></kbd>+<kbd>T</kbd> or on Ubuntu press <kbd><font-awesome-icon:icon="['fab', 'ubuntu']"></font-awesome-icon></kbd>+<kbd>Alt</kbd>+<kbd>T</kbd> to open a terminal, and type in these commands:
40
42
41
43
```bash
42
44
lsblk
@@ -84,4 +86,52 @@ exit
84
86
reboot
85
87
```
86
88
87
-
Now, enter the original passphrase. Here you will be prompted for the new passphrase, and then to confirm the new passphrase.
89
+
## Changing LUKS passphrase
90
+
91
+
If you would like to change the password on a LUKS encrypted partition, run this command (replace the example partition with your root partition):
92
+
93
+
```bash
94
+
cryptsetup luksChangeKey /dev/sda3 -S 0
95
+
```
96
+
97
+
Enter the original pass-phrase, and follow the prompts for the new pass-phrase ( and to confirm the new pass-phrase).
98
+
99
+
## Adding LUKS passphrases
100
+
101
+
Full Disk Encryption supports up to 8 total pass-phrases to unlock the encryption. This is useful if you would like to allow more than a single user to unlock the encryption and not share a pass-phrase. The default pass-phrase is in slot 0, with space for additional pass-phrases in slots 1 through 7 (for a total of 8).
102
+
103
+
### List Partitions
104
+
105
+
First let's list the partitions of all of the installed drives:
106
+
107
+
```bash
108
+
lsblk -o name,mountpoints
109
+
```
110
+
111
+
The output may be different based on the drive setup and partition table. You can see the root partition at mountpoint '/'. From there we can use that output to run this command:
112
+
113
+
```bash
114
+
sudo cryptsetup luksDump /dev/sda3
115
+
```
116
+
117
+
Replacing '/dev/sda3' with the location of the root partition on your system. With the output of this command we can see the seven extra slots that we have for passwords to decrypt the drive. On a normal install Slot 0 is the initial passphrase and you can add up to 6 more for a total of 7.
118
+
119
+
#### Set Extra Password
120
+
121
+
Following the partition scheme from the previous command we can form the next command to add a new key to the open Key Slot:
122
+
123
+
```bash
124
+
sudo cryptsetup luksAddKey /dev/sda3
125
+
```
126
+
127
+
This command will require the current encryption password before new password can be added.
128
+
129
+
#### Confirm The Password
130
+
131
+
Let's run this command again to confirm that the additional pass-phrase is set:
132
+
133
+
```bash
134
+
sudo cryptsetup luksDump /dev/sda3
135
+
```
136
+
137
+
You should see that Key Slot 1 is now enabled so this confirms the new pass-phrase is set.
0 commit comments