YKPAMCFG(1)
π YKPAMCFG β ok bestie, let's talk about your YubiKey π
So likeβ¦ this is the Yubico PAM Module Manual page for ykpamcfg, and fr fr it's the little tool that manages user settings for the Yubico PAM module. It's giving "I hold the keys to your login" energy and honestly? Obsessed. π
β¨ SYNOPSIS β¨
ykpamcfg [-1 | -2] [-A] [-p] [-i] [-v] [-V] [-h]
That's the whole vibe. Short. Iconic. Slays. π
π¦ OPTIONS π¦
-1β use slot 1. This is the default, so if you just roll up with nothing, slot 1 is what you get. Main character default energy. π-2β use slot 2 instead. The sequel. The upgrade. The other one. β¨-Aaction β pick which action you wanna perform. The deets live down in ACTIONS below, bestie, go read 'em. π-ppath β tell it where to write the output file. Default is~/.yubico/challenge, so like, if you don't say anything it just vibes in your home dir. π-iiterations β how many iterations to use for PBKDF2 of the expected response. Number goes up, number goes down, you decide. π’-vβ verbose mode!! Turn this on and it actually talks to you about what it's doing. Highly recommend. π£οΈ-Vβ display version and dip out. Bye bestie. π-hβ display help and dip out. Also bye. π
πΈ ACTIONS πΈ
add_hmac_chalresp
Okay so this one's the moment. The PAM module can utilize the HMAC-SHA1 Challenge-response (C/R) mode β the way that it's found in YubiKeys starting with version 2.2 β for offline authentication. No internet required, she's self-sufficient, she's independent. π
This action creates the initial state information with the C/R to be issued at the next logon. Setting up the first date so the next login knows what to expect. Cute. π
The utility currently outputs the state information to a file in the current user's home directory:
~/.yubico/challenge-123456β for a YubiKey with serial number API readout enabled~/.yubico/challengeβ for one without it
The PAM module supports a system-wide directory for these state files (in case the user's home directories are encrypted β shoutout to everyone whose /home is locked down π), but in a system-wide directory, the challenge part should be replaced with the username.
Example: /var/yubico/challenges/alice-123456
To use the system-wide mode, you currently have to move the generated state files manually and configure the PAM module accordingly. No auto-magic. You do it. With your hands. π
β EXAMPLES β
First, program a YubiKey for challenge-response on slot 2:
$ ykpersonalize -2 -ochal-resp -ochal-hmac -ohmac-lt64 -oserial-api-visible
...
Commit? (y/n) [n]: y
Now, set the current user to require this YubiKey for logon:
$ ykpamcfg -2 -v
...
Stored initial challenge and expected response in '/home/alice/.yubico/challenge-123456'.
Look at that. It stored it. She ate. π₯
Then, configure authentication with PAM for example like this (make a backup first β I am BEGGING you, back it up π):
/etc/pam.d/common-auth (from Ubuntu 10.10):
auth required pam_unix.so nullok_secure try_first_pass
auth [success=1 new_authtok_reqd=ok ignore=ignore default=die] pam_yubico.so mode=challenge-response
auth requisite pam_deny.so
auth required pam_permit.so
auth optional pam_ecryptfs.so unwrap
π BUGS π
Found a bug? Report ykpamcfg bugs in the issue tracker, bestie:
https://github.com/Yubico/yubico-pam/issues
(Not me begging you to actually file it instead of just complaining in the group chat. π)
π«Ά SEE ALSO π«Ά
pam_yubico(8)β the sibling. The co-star. Go read it too.- The yubico-pam home page:
https://developers.yubico.com/yubico-pam/ - YubiKeys can be obtained from Yubico:
http://www.yubico.com/β go get you one, treat yourself. π
Okay that's the whole page!! This little slice of heaven comes to you courtesy of yubico-pam, Version 2.27. Mwah. Stay authenticated, bestie. πβ¨π
π¦ where this page comes from
- alpine 3.24: yubico-pam-doc 2.27-r3 Β· BSD-2-Clause
- debian trixie: libpam-yubico 2.27-1+b1 Β· BSD-2-Clause
- epel 10: pam_yubico 2.27-7.el10_1 Β· LicenseRef-Callaway-BSD
- fedora 43: pam_yubico 2.27-9.fc43 Β· LicenseRef-Callaway-BSD
- fedora 43: pam_yubico 2.27-9.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: pam_yubico 2.27-10.fc44 Β· LicenseRef-Callaway-BSD
- fedora 44: pam_yubico 2.27-10.fc44 Β· LicenseRef-Callaway-BSD
- ubuntu questing: libpam-yubico 2.27-2
- ubuntu resolute: libpam-yubico 2.27-3 Β· BSD-2-Clause
- ubuntu stonking: libpam-yubico 2.27-3 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms