finds.dev

Yubico/yubico-pam

Yubico Pluggable Authentication Module (PAM)

View on GitHubHomepage ↗

★ 707CBSD-2-Clauseupdated Nov 2024

// the take

A PAM module from Yubico that plugs YubiKey hardware authentication into any PAM-aware login flow on Linux/Unix — SSH, console login, OpenVPN, FreeRADIUS, etc. It supports either online OTP validation against YubiCloud (or a self-hosted validation server) or fully offline HMAC-SHA1 challenge-response, aimed at sysadmins adding a hardware second factor to existing auth infrastructure.

Covers both online and offline validation paths, so it still works on boxes with no outbound network access via challenge-response mode. Authorization mapping is flexible — central /etc/yubikey_mappings file, per-user ~/.yubico/authorized_yubikeys, or LDAP/Active Directory attribute lookup — so it fits centralized and self-service deployments alike. It's vendor-authored by Yubico itself rather than a third-party reimplementation, and it stacks cleanly with other PAM modules via try_first_pass/use_first_pass instead of forcing single-factor replacement. CI includes CodeQL scanning on a C codebase, which matters for something sitting directly in the auth path.

Last push was November 2024 on a module that sits in the login critical path — for something this security-sensitive, a slow patch cadence is a real exposure, not just housekeeping. It pulls in a chain of satellite C libraries (libykclient, libyubikey, optionally libykpers-1) each versioned independently, so building from source on a current distro can be brittle. LDAP bind passwords and MySQL mapping credentials are configured in plaintext directly in /etc/pam.d/ config lines, which is ordinary exposure for anyone who can read PAM configs. The debug mode writes OTPs and token IDs to a log file the docs tell you to make world-writable, and the alwaysok flag silently disables authentication entirely — both are sharp edges that are easy to leave on by accident in an auth module.

We read the README, the directory tree and a key source file in October 2026. Nobody pays to be listed. How we judge →

search the same ground:

// at a glance

Stars
707
Forks
121
Language
C
License
BSD-2-Clause
Last commit
19 Nov 2024

// nearby

If yubico-pam isn't quite it.

All repos →