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/docs/security/yubikey.md
+36-4Lines changed: 36 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,20 @@ The YubiKey works reliably for everything **outside** of early boot:
19
19
-**pam-u2f**: YubiKey touch for `sudo` and GNOME screen unlock
20
20
21
21
22
+
## Yubico Authenticator (OATH/TOTP)
23
+
24
+
Yubico Authenticator stores TOTP secrets on the YubiKey itself rather than on the device. It requires a smartcard daemon to communicate with the key.
25
+
26
+
### Install
27
+
28
+
```bash
29
+
sudo pacman -S ccid pcsclite
30
+
sudo systemctl enable --now pcscd.socket
31
+
```
32
+
33
+
Then install Yubico Authenticator from Flathub or the CachyOS repository and plug in the YubiKey. The app reads the TOTP credentials directly from the key.
34
+
35
+
22
36
## What Was Attempted: FIDO2 LUKS Unlock
23
37
24
38
The goal was: plug in YubiKey → touch at boot → LUKS unlocks → desktop. No LUKS password needed.
@@ -124,7 +138,7 @@ account include system-auth
124
138
session include system-auth
125
139
```
126
140
127
-

141
+

128
142
129
143
Test without closing the current terminal first:
130
144
@@ -133,10 +147,28 @@ sudo echo test
133
147
# "Please touch the FIDO authenticator." → touch → done
134
148
```
135
149
136
-

150
+

137
151
138
152
Without the YubiKey plugged in, it falls through to password as normal.
139
153
154
+
### Configure graphical sudo (polkit)
155
+
156
+
GNOME's graphical authentication dialog (shown when changing system settings, printer config, etc.) uses a separate PAM service: `polkit-1`. This file doesn't exist by default on CachyOS, so polkit falls back to password-only.
157
+
158
+
Create `/etc/pam.d/polkit-1`:
159
+
160
+
```
161
+
#%PAM-1.0
162
+
auth sufficient pam_u2f.so cue
163
+
auth include system-auth
164
+
account include system-auth
165
+
session include system-auth
166
+
```
167
+
168
+
The `cue` text prompt does appear in the graphical dialog as well. Touching the YubiKey authenticates without needing to type a password. Without the key plugged in, it falls back to password as usual.
169
+
170
+

171
+
140
172
### Configure GNOME lock screen
141
173
142
174
Edit `/etc/pam.d/gdm-password`:
@@ -153,11 +185,11 @@ session include system-local-login
153
185
session optional pam_gnome_keyring.so auto_start
154
186
```
155
187
156
-

188
+

157
189
158
190
Lock the screen with `Super+L` and touch the YubiKey to unlock.
159
191
160
-

192
+

Copy file name to clipboardExpand all lines: content/docs/security/yubikey.nl.md
+36-4Lines changed: 36 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,20 @@ De YubiKey werkt betrouwbaar voor alles **buiten** de vroege bootprocessen:
19
19
-**pam-u2f**: YubiKey touch voor `sudo` en GNOME-schermvergrendeling
20
20
21
21
22
+
## Yubico Authenticator (OATH/TOTP)
23
+
24
+
Yubico Authenticator slaat TOTP-geheimen op de YubiKey zelf op in plaats van op het apparaat. Hiervoor is een smartcard-daemon nodig om met de key te communiceren.
25
+
26
+
### Installatie
27
+
28
+
```bash
29
+
sudo pacman -S ccid pcsclite
30
+
sudo systemctl enable --now pcscd.socket
31
+
```
32
+
33
+
Installeer vervolgens Yubico Authenticator via Flathub of de CachyOS-repository en sluit de YubiKey aan. De app leest de TOTP-credentials rechtstreeks van de key.
34
+
35
+
22
36
## Wat Geprobeerd Is: FIDO2 LUKS Ontgrendeling
23
37
24
38
Het doel was: YubiKey inpluggen → aanraken bij boot → LUKS ontgrendelt → bureaublad. Geen LUKS-wachtwoord nodig.
@@ -124,7 +138,7 @@ account include system-auth
124
138
session include system-auth
125
139
```
126
140
127
-

141
+

128
142
129
143
Test eerst zonder de huidige terminal te sluiten:
130
144
@@ -133,10 +147,28 @@ sudo echo test
133
147
# "Please touch the FIDO authenticator." → aanraken → klaar
134
148
```
135
149
136
-

150
+

137
151
138
152
Zonder YubiKey ingeplugd valt het terug op wachtwoord.
139
153
154
+
### Grafische sudo configureren (polkit)
155
+
156
+
De grafische authenticatiedialoog van GNOME (verschijnt bij het wijzigen van systeeminstellingen, printerinstellingen, etc.) gebruikt een aparte PAM-service: `polkit-1`. Dit bestand bestaat standaard niet op CachyOS, waardoor polkit terugvalt op wachtwoord-only.
157
+
158
+
Maak `/etc/pam.d/polkit-1` aan:
159
+
160
+
```
161
+
#%PAM-1.0
162
+
auth sufficient pam_u2f.so cue
163
+
auth include system-auth
164
+
account include system-auth
165
+
session include system-auth
166
+
```
167
+
168
+
De `cue` tekstprompt verschijnt ook in de grafische dialoog. De YubiKey aanraken authenticeert zonder wachtwoord te hoeven typen. Zonder YubiKey ingeplugd valt hij terug op wachtwoord.
169
+
170
+

171
+
140
172
### GNOME-schermvergrendeling configureren
141
173
142
174
Bewerk `/etc/pam.d/gdm-password`:
@@ -153,11 +185,11 @@ session include system-local-login
153
185
session optional pam_gnome_keyring.so auto_start
154
186
```
155
187
156
-

188
+

157
189
158
190
Vergrendel het scherm met `Super+L` en raak de YubiKey aan om te ontgrendelen.
159
191
160
-

192
+

0 commit comments