docs(pam): session gate so GNOME asks for the password at first login, face at unlock - #105
Open
jeffshee wants to merge 1 commit into
Open
docs(pam): session gate so GNOME asks for the password at first login, face at unlock#105jeffshee wants to merge 1 commit into
jeffshee wants to merge 1 commit into
Conversation
…, face at unlock A face cannot unlock the GNOME keyring, so with pam_visage sufficient in gdm-password the first login after boot succeeds by face and the keyring asks for the password anyway. GNOME uses gdm-password for both the login screen and the lock screen, so PAM cannot separate them by name; what differs is that at unlock the user already owns a session. contrib/pam/visage-has-session is a pam_exec helper that exits 0 when $PAM_USER has a login session and 1 otherwise. Used as auth [success=ignore default=1] pam_exec.so quiet /usr/local/libexec/visage-has-session auth sufficient pam_visage.so first login takes the password path and face stays available for unlock. Only GNOME has been tested; desktops whose locker has its own PAM service just put pam_visage on that service instead. Verified on Fedora 44 / GNOME 50 with a fingerprint reader enrolled: lock-screen unlock by face, password prompt at fresh login, no SELinux denials. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Jeff Shee <jeffshee8969@gmail.com>
jeffshee
added a commit
to jeffshee/visage
that referenced
this pull request
Sep 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this solve?
A face cannot unlock the GNOME keyring; that needs the login password. With
pam_visagesufficientingdm-password, the first login after boot succeeds by face and the keyringimmediately asks for the password anyway, so face login buys nothing there while face unlock
of the lock screen is genuinely useful.
GNOME uses the same PAM service,
gdm-password, for both the login screen and the lockscreen, so PAM cannot separate the two by service name.
Type
pam_exechelper undercontrib/pam/What this changes
contrib/pam/visage-has-session: a ten-lineloginctlcheck that exits 0 when$PAM_USERalready owns a login session (this is an unlock) and 1 otherwise (first login). Used as
first login falls through to the password stack, which also unlocks the keyring, and face
stays available for unlock.
contrib/pam/README.mdcovers install, test, and the interactionwith a fingerprint reader (GDM runs
gdm-passwordandgdm-fingerprintconcurrently; facebelongs in
gdm-passwordonly). The operations guide gains a five-line section pointingthere.
Scope: GNOME only. Desktops whose lock screen has its own PAM service do not need this; they
put
pam_visageon the unlock service instead. Nothing else has been tested and the docs donot claim otherwise.
Testing
Fedora 44, GNOME 50,
authselect sssd with-fingerprint, Goodix reader enrolled:opens with it;
PAM_USER=$USER→ 0 while logged in,PAM_USER=nobody→ 1;usr_tunder/usr/local/libexec, runs onlyloginctl).Checklist
cargo fmt --all -- --checkpassescargo clippy --workspace -- -D warningspassescargo test --workspacepassesgit commit -s) per the DCO