| Crates.io | oo7-pam |
| lib.rs | oo7-pam |
| version | 0.6.0-alpha |
| created_at | 2026-01-21 08:09:38.399024+00 |
| updated_at | 2026-01-21 08:09:38.399024+00 |
| description | PAM module for oo7 Secret Service integration |
| homepage | https://github.com/bilelmoussaoui/oo7 |
| repository | https://github.com/bilelmoussaoui/oo7 |
| max_upload_size | |
| id | 2058601 |
| size | 51,537 |
A PAM (Pluggable Authentication Modules) module that integrates with the oo7 Secret Service daemon to automatically unlock keyrings during user authentication.
The PAM module communicates with the oo7 daemon via a Unix domain socket to securely transmit the user's login password for keyring unlocking:
Socket Creation: The daemon (running as the user) creates the Unix domain socket at $XDG_RUNTIME_DIR/oo7/pam.sock (typically /run/user/$UID/oo7/pam.sock, or path specified by OO7_PAM_SOCKET)
0600 (read/write by owner only)Authentication Flow:
pam_oo7.so during the authentication phaseBuild the PAM module as a shared library:
cargo build --release -p pam_oo7
The resulting library will be at: target/release/libpam_oo7.so
sudo cp target/release/libpam_oo7.so /usr/lib64/security/pam_oo7.so
# or on some systems:
sudo cp target/release/libpam_oo7.so /lib/x86_64-linux-gnu/security/pam_oo7.so
Add the module to your PAM configuration. For example, in /etc/pam.d/system-auth or /etc/pam.d/common-auth:
auth optional pam_oo7.so
Important: Use optional so that authentication doesn't fail if the oo7 daemon is not running.
In /etc/pam.d/gdm-password:
#%PAM-1.0
auth required pam_env.so
auth required pam_unix.so
auth optional pam_oo7.so
account required pam_unix.so
password required pam_unix.so
password optional pam_oo7.so
session required pam_unix.so
session optional pam_oo7.so auto_start
session optional pam_systemd.so
Important: The module should be added to three PAM stacks:
auth stack: Captures and stashes the password during authenticationsession stack: Retrieves the stashed password and sends it to the daemon for keyring unlockingpassword stack: Intercepts password changes and updates the keyring password to matchWhen added to the password stack, the module will automatically update your keyring passwords when you change your user password (e.g., using passwd command). This ensures your keyrings remain accessible after password changes.
The module intercepts the password change operation:
OO7_PAM_SOCKET: Path to the Unix domain socket for daemon communication
$XDG_RUNTIME_DIR/oo7/pam.sock (typically /run/user/$UID/oo7/pam.sock)The project is released under the MIT license.