fix: PAM-Fingerprint hart verdrahtet, Greeter bewusst ohne Finger
This commit is contained in:
1 parent
0ca77f021c
commit
ecf81aafb5
2 files changed
+37
-4
No files matched your search
+35
-4
@@ -30,10 +30,11 @@ dnf5 install -y \
|
||||
dnf5 clean all
|
||||
|
||||
# Fingerprint (Framework u.a.): System-Auth per authselect erweitern, damit
|
||||
# sudo/Polkit/login-Pfade Finger anbieten (nach fprintd-enroll auf Hardware).
|
||||
# Greeter-PAM (/etc/pam.d/greetd) bewusst NICHT angefasst: Feinschliff erst
|
||||
# auf echter Hardware mit Reader testbar, kein VM-Test moeglich.
|
||||
authselect enable-feature with-fingerprint || echo "WARN: with-fingerprint nicht aktivierbar - auf Hardware pruefen"
|
||||
# sudo/Polkit Finger anbieten (nach fprintd-enroll auf Hardware).
|
||||
# Hart fehlschlagen statt WARN: Ein Image ohne pam_fprintd im Stack baut
|
||||
# still einen kaputten Finger-Login (D-Bus-Geste ohne PAM-Wirkung).
|
||||
authselect enable-feature with-fingerprint
|
||||
grep -q 'pam_fprintd\.so' /etc/pam.d/system-auth || { echo "FEHLER: pam_fprintd fehlt in /etc/pam.d/system-auth trotz with-fingerprint"; exit 1; }
|
||||
|
||||
# accounts-daemon: liefert User-Avatare auf dem Login-Screen.
|
||||
systemctl enable accounts-daemon.service
|
||||
@@ -74,6 +75,36 @@ session optional pam_gnome_keyring.so auto_start
|
||||
EOF
|
||||
fi
|
||||
|
||||
# Greeter bewusst OHNE Fingerprint (eigene, fingerprint-freie Auth-Service,
|
||||
# vgl. Noctalia-Doku "Fingerprint blocks password login"): system-auth
|
||||
# enthaelt pam_fprintd (siehe oben). Am Login wuerde der Finger nie das
|
||||
# Passwort liefern -> Keyring bliebe zu -> zweite Abfrage nach dem Login.
|
||||
# Login daher nur per Passwort (Keyring oeffnet mit); Finger gilt fuer
|
||||
# sudo/Polkit/Sperrbildschirm. Nur die auth-Zeile wird ersetzt, account/
|
||||
# password/session-Includes bleiben (kein Finger-Prompt dort).
|
||||
if grep -Eq '^auth[[:space:]]+(substack|include)[[:space:]]+system-auth' /etc/pam.d/greetd; then
|
||||
python3 - <<'PYEOF'
|
||||
import re
|
||||
p = "/etc/pam.d/greetd"
|
||||
text = open(p).read()
|
||||
replacement = (
|
||||
"# fluffy-pancake: fingerprint-freier Auth-Stack NUR fuer greetd.\n"
|
||||
"# (system-auth mit pam_fprintd wuerde Finger-Login ohne Keyring-Unlock\n"
|
||||
"# bedeuten. faillock bewusst weggelassen wie im Profil ohne with-faillock.)\n"
|
||||
"auth required pam_env.so\n"
|
||||
"auth required pam_faildelay.so delay=2000000\n"
|
||||
"auth sufficient pam_unix.so nullok\n"
|
||||
"auth required pam_deny.so\n"
|
||||
)
|
||||
new, n = re.subn(r'^auth[ \t]+(?:substack|include)[ \t]+system-auth[ \t]*\r?$', replacement.rstrip("\n"), text, count=1, flags=re.M)
|
||||
assert n == 1, "auth system-auth-Zeile in /etc/pam.d/greetd nicht gefunden"
|
||||
open(p, "w").write(new)
|
||||
print("greetd-PAM: fingerprint-freier Auth-Stack gesetzt")
|
||||
PYEOF
|
||||
fi
|
||||
grep -Eq '^auth[[:space:]]+(substack|include)[[:space:]]+system-auth' /etc/pam.d/greetd && { echo "FEHLER: auth system-auth-Include noch in /etc/pam.d/greetd"; exit 1; }
|
||||
grep -q 'pam_gnome_keyring\.so' /etc/pam.d/greetd || { echo "FEHLER: Keyring-PAM fehlt in /etc/pam.d/greetd"; exit 1; }
|
||||
|
||||
# bootc-Hygiene: /var-Inhalte aus dem Build werden beim Deployment verworfen
|
||||
# und wuerden nur den var-tmpfiles-Lint triggern. Die /etc-Anteile des Setups
|
||||
# (PAM) bleiben erhalten; /var/lib/noctalia-greeter wird zur Laufzeit via
|
||||
|
||||
Reference in new issue
Block a user