From 7ec9e49b974a419bea2071d475c5ae44638dd3e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20P=C3=A9ch=C3=A8r?= Date: Tue, 29 Jul 2025 16:25:50 +0200 Subject: [PATCH 1/2] Add fingerprint auth --- install/fingerprint-setup.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 install/fingerprint-setup.sh diff --git a/install/fingerprint-setup.sh b/install/fingerprint-setup.sh new file mode 100644 index 000000000..31b17855c --- /dev/null +++ b/install/fingerprint-setup.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +if ! lsusb | grep -Eiq 'fingerprint|synaptics|goodix'; then + echo -e "\e[31m\nNo fingerprint sensor detected.\e[0m" +else + # Enable the fingerprint authentication in common-auth via utility + # This will enable it for sudo and app-based PAM + sudo pam-auth-update --enable fprintd + + # Check whether any fingers have already been enrolled, to handle omamix update scenarios + enrolled_fingers=$(fprintd-list $USER | grep -E "\-(thumb|finger)") + if [ -n "$enrolled_fingers" ]; then + echo -e "\e[32m\nYou already have fingerprints enrolled; let's check one.\e[0m" + else + + # Enroll the first finger + echo -e "\e[32m\nLet's setup your first fingerprint.\nKeep moving the finger around on the sensor until the process completes.\n\e[0m" + sudo fprintd-enroll $USER + fi + + if fprintd-verify; then + # fprintd's enroll message will pick a finger, right index by default. + echo -e "\e[32m\nPerfect! Now you can use your fingerprint to login, sudo, and app auth (like 1password).\e[0m" + + echo -e "\e[32m\nYou can enroll additional fingers in settings.\e[0m" + else + echo -e "\e[31m\nSomething went wrong. Maybe try again?\e[0m" + fi +fi From 8d063b9b74a9ef8d037fbdb0687c8d36b69e2f29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20P=C3=A9ch=C3=A8r?= Date: Tue, 29 Jul 2025 18:57:11 +0200 Subject: [PATCH 2/2] Add fingerprint auth migration --- migrations/1753807915.sh | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 migrations/1753807915.sh diff --git a/migrations/1753807915.sh b/migrations/1753807915.sh new file mode 100644 index 000000000..4eb8ddb8e --- /dev/null +++ b/migrations/1753807915.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +# Run fingerprint setup +source ~/.local/share/omakub/install/fingerprint-setup.sh