Back to technology news
General Technology

Two FIDO2 Security Keys on Fedora Linux 45

On the first day working with Fedora Linux 45, the author aimed to use a physical FIDO2 security key, its PIN, and a touch to unlock the encrypted system, sign in, unlock the screen, and approve administrative actions without typing the account password. By the end of the session, two Yubico Security Key NFC devices were working across all four USB ports of a Dell Latitude E6430 ATG, allowing disk unlock with one key and desktop authentication with the other. Repeated swaps continued to work. Two Identiv uTrust devices also enrolled and initially passed several tests, but later boot-unlock failures made their results much less dependable. This is a non-production lab report; the author stresses that results are not a guarantee of long-term stability or compatibility with different computers.

The policy permits a registered key with PIN and touch or a retained password fallback; it does not enforce possession of a key for every login. Anyone who knows a valid fallback password can still use it, a distinction that matters when deciding which threats this setup addresses. The author's goal is to build a computer where they almost never need to enter a reusable password during normal operations, ideally relying on either the primary or backup FIDO2 security key for 99% or more of everyday authentication. Strong, unique, high-entropy disk and account passwords are retained as protected recovery credentials for lost keys, hardware failures, or emergencies. The 99% figure is an objective, not a measured result from this lab.

The test environment was a clean Fedora Workstation 45 installation using GNOME and GDM, with kernel 7.2.15-300.fc45.x86_64, systemd 262.1-1.fc45, and PAM packages pam-u2f and pamu2fcfg 1.4.0-8.fc45. The two Yubico devices identified themselves as Security Key NFC models with firmware 5.7.4 and 5.8.0. The installer encrypted the main system volume containing Btrfs root and home filesystems, with the EFI and /boot partitions outside that encrypted volume. The target was /dev/sda3; that name is specific to this installation. A fresh installation and a different desktop configuration were used compared to a prior Fedora 42 article describing a Cinnamon and LightDM setup.

Disk enrollment and account registration are separate processes. With only the intended key connected, the author enrolled it against the verified LUKS2 partition with client-PIN and user-presence requirements, added fido2-device=auto to the crypttab option field, included the dracut fido2 module, rebuilt the running kernel's initramfs, and confirmed the module was present. The first boot test took a PIN and touch and reached the graphical login screen, completing the disk part but not enrolling the key for the account. For the account, pamu2fcfg --pin-verification was used as the normal user, the mapping was stored in ~/.config/Yubico/u2f_keys, and with-pam-u2f was enabled in the existing local authselect profile. A fresh sudo test returned root after PIN and touch; the graphical pkexec test and screen-locking/unlock tests also passed.

The second Yubico key was registered to a separate file, and the current account mapping was backed up before appending its credential to the same account line, as the mapping format accommodates multiple credentials for one username. The physical key was then enrolled separately for LUKS, receiving slot 4 because two uTrust enrollments had already occupied slots 2 and 3; the first Yubico enrollment was in slot 1, and the original disk-passphrase route remained in slot 0. All enrollments remain in place; the procedure did not require a fresh crypttab edit for every additional authenticator. Repeated testing showed the uTrust keys produced intermittent disk-unlock failures, even when connected before startup, while the Yubico keys succeeded across all four physical USB ports without failures.

The author also tested booting without a connected key; entering the usual token PIN with the key absent eventually revealed the disk-passphrase prompt, and the strong disk passphrase unlocked the volume, with the account-password fallback allowing login. Late insertion after reaching the boot prompt was less dependable than having the chosen key plugged in before power-on. On November 17, 2026, the lab was extended to test SSH from a Windows computer using OpenSSH's native FIDO2 support, where a Yubico key connected to Windows authenticated successfully without entering the Fedora account password. The author emphasizes that before extending this to another environment, protected off-device recovery material, a lost-key revocation plan, and testing after updates are required, and that the home-directory PAM mapping also needs consideration in any more demanding threat model.

Source credits

By Joe Murphy from Fedora Magazine. Edited by SetuGeo.

CC BY-SA 4.0

More technology news

Browse all technology news