PAM_GNOME_KEYRING(8)
π pam_gnome_keyring β ok bestie, let me tell you about the Gnome Keyring PAM module
So this is pam_gnome_keyring, a page from the Gnome Keyring PAM Module Manua (that's the manual name, not a typo, it's just how it's spelled there π«Ά). It's a PAM module, it's in section 8, and it's about unlocking your Gnome Keyring automatically so you don't have to type your password a million times. Iconic behavior, honestly.
β¨ NAME β¨
pam_gnome_keyring β automatic unlocking of Gnome Keyring. That's it, that's the whole vibe. π
π SYNOPSIS π
pam_gnome_keyring.so
Yep. That's the whole invocation. You just drop that name into your PAM config and the magic happens. No arguments required at the top level, no flags on the module line itself β the options go after it, and we'll get to those. π
πΈ DESCRIPTION πΈ
Okay so here's the tea β β the Gnome Keyring service module for PAM is a triple threat. It handles three PAM categories:
- authentication (module-type parameter:
auth) - session management (module-type parameter:
session) - password management (module-type parameter:
password)
Three whole personalities, one module. Main character energy fr fr. Let's break each one down. π¦
π Authentication Module
The Gnome Keyring authentication module snags the password that a previous module already got in the PAM stack, and tucks it away for later use. Cute, right? π
But listen β when no password was obtained, this module literally does nothing and returns success. It will never prompt for a password by itself. Never ever. Not its job, not its problem.
Unless otherwise noted, this module returns success. Say it with me: success is the default. β¨
Here are the options you can pass to the authentication module:
auto_startβ the Gnome Keyring daemon gets started if it's not already running, and the login keyring gets unlocked using the password you provided. But if any of that fails, this module returns an error. No pressure or anything. π- *
only_if=service* β a comma separated list of services (likegdm,xdm) that this module will actually handle. If your service isn't on the list, the module returns success without doing anything. Basically a VIP list. π
π Session Management Module
The session management module is all about starting and ending sessions β the open and the close, the hello and the bye. π
Here's how it goes: if the Gnome Keyring daemon isn't running, or no password was stored by the authentication module, this module returns success and we move on. Otherwise? It'll try to unlock the login keyring, and if the unlocking fails, this module returns an error. π¬
And when the session is terminated, if the daemon was started in either module, then that daemon gets terminated too. Clean exits only, bestie. β¨
Options for the session management module:
auto_startβ same as in authentication. But heads up: either the authentication or the session management module must have theauto_startoption for the Gnome Keyring daemon to actually get started. Pick one, pick both, just don't pick neither. π- *
only_if=service* β list of services to handle. Same VIP-list situation as above. ποΈ
π Password Management Module
The password module is the one that lets you change the password for the login keyring. Very glow-up of it. π
Rules of the game:
- If no old password was obtained by a previous module in the stack, this module is just ignored. Not today. π
- On the flip side, when no new password was obtained, this module will prompt for one. It's gotta have it.
The Gnome Keyring daemon gets started if it's not already running β and it gets stopped after concluding the operation if it wasn't running before. Tidy! π§Ή
Options for the password management module:
auto_startβ keep the daemon running even when it was started by this module. You started it, but it stays. Queen behavior. π- *
only_if=service* β list of services to handle. Yes, again. Consistency is key. ποΈ use_authtokβ do not prompt for a new password. And if it's not provided? Return error. That's the deal, no negotiation. π¨
ποΈ FILES ποΈ
$HOME/.local/share/keyrings/login.keyringβ the encrypted login keyring. That's the little vault. π
π§ EXAMPLES π§
Okay, practical time, because this is where it all clicks. π€©
Here's the example of the file /etc/pam.d/gdm, which configures the gdm service to use standard UNIX authentication plus start and unlock Gnome Keyring. The rest of the configuration is inherited from the login service configuration. Slay, inheritance.
auth required pam_unix.so
auth optional pam_gnome_keyring.so
account include login
session include login
session optional pam_gnome_keyring.so auto_start
password include login
And here's the example of the file /etc/pam.d/passwd, which configures the passwd program to update the keyring password right along with the user's system password. Two birds, one password change. π¦π¦
password required pam_unix.so
password optional pam_gnome_keyring.so
β οΈ NOTES β οΈ
Real talk, bestie β Gnome Keyring implements its own SSH agent, so you should not stack it with pam_ssh for session management. Just don't. They would fight. π
π SEE ALSO π
pam.conf(5), pam.d(5), pam(8), auditctl(8), auditd(8) β go read those too, expanding your knowledge is always a vibe. πβ¨
π AUTHOR π
pam_gnome_keyring was written by Stef Walter <stef@thewalter.net>. Legend behavior. ππΈ
Okay that's the whole page, you made it!! π This was the Gnome Keyring PAM Module Manua, PAM_GNOME_KEYRING(8), and it's giving "your keyring unlocks itself now" energy. Go forth and never type that password twice. πβ¨π«Ά
π¦ where this page comes from
- opensuse-leap 16.0: gnome-keyring-pam 48.0-160000.2.2 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: gnome-keyring-pam 48.0-160000.2.2 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: gnome-keyring-pam 48.0-160000.2.2 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: gnome-keyring-pam 48.0-160000.2.2 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms