Extend the clamshell gate to /etc/pam.d/sudo, not just polkit-1. When the lid is shut the reader is unreachable, so a terminal sudo would block on "Place your finger" until pam_fprintd timed out before letting you type the password. The same pam_exec gate (success=1 skips fingerprint when the lid is closed) now runs ahead of pam_fprintd in the sudo stack as well. setup and removal share one gate definition across sudo and polkit; the migration now gates both stacks on existing installs. Resolves the clamshell case in #856 and supersedes #6003. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
40 lines
1.3 KiB
Bash
Executable File
40 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# omarchy:summary=Remove fingerprint authentication from sudo, polkit, and lock screen
|
|
# omarchy:requires-sudo=true
|
|
|
|
set -e
|
|
|
|
|
|
remove_pam_config() {
|
|
# Remove from sudo (both the fingerprint module and its clamshell gate)
|
|
if grep -Eq 'pam_fprintd\.so|omarchy-hw-laptop-closed' /etc/pam.d/sudo; then
|
|
echo "Removing fingerprint authentication from sudo..."
|
|
sudo sed -i -e '/pam_fprintd\.so/d' -e '/omarchy-hw-laptop-closed/d' /etc/pam.d/sudo
|
|
fi
|
|
|
|
# Remove from polkit (both the fingerprint module and its clamshell gate)
|
|
if [[ -f /etc/pam.d/polkit-1 ]] && grep -Eq 'pam_fprintd\.so|omarchy-hw-laptop-closed' /etc/pam.d/polkit-1; then
|
|
echo "Removing fingerprint authentication from polkit..."
|
|
sudo sed -i -e '/pam_fprintd\.so/d' -e '/omarchy-hw-laptop-closed/d' /etc/pam.d/polkit-1
|
|
fi
|
|
}
|
|
|
|
remove_lock_fingerprint_pam() {
|
|
if [[ -f /etc/pam.d/omarchy-lock-fingerprint ]]; then
|
|
echo "Removing lock screen fingerprint authentication..."
|
|
sudo rm -f /etc/pam.d/omarchy-lock-fingerprint
|
|
fi
|
|
}
|
|
|
|
|
|
echo -e "\e[32mRemoving fingerprint scanner from authentication.\n\e[0m"
|
|
|
|
remove_pam_config
|
|
remove_lock_fingerprint_pam
|
|
|
|
echo "Removing fingerprint packages..."
|
|
omarchy-pkg-drop fprintd libfprint-git
|
|
|
|
echo -e "\e[32mFingerprint authentication has been completely removed.\e[0m"
|