PAM_DUO(8)

πŸ“¦
version 2.2.3 Β· 2 versions
, in epel 10, epel 9, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable

πŸ’– NAME πŸ’–

pam_duo β€” bestie, it's a PAM module for Duo authentication ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

pam_duo.so [conf=⟨FILENAME⟩]

🌸 DESCRIPTION 🌸

okay so pam_duo gives you secondary authentication β€” usually the step that happens after your password-based auth already went through β€” and it does that via the Duo authentication service. it's giving "you got past the door, now show me the second key" πŸ”πŸ’…


✨ OPTIONS ✨

here's every config option the PAM module itself supports, no gatekeeping:

  • conf β€” point it at an alternate configuration file to load instead. default is /etc/duo/pam_duo.conf.
  • debug β€” debug mode, babes. log messages go to stderr instead of syslog.

πŸŽ€ CONFIGURATION πŸŽ€

the config file is INI-format and it must have a "duo" section, with these options inside πŸ‘‡

  • host β€” the Duo API host. required.
  • ikey β€” the Duo integration key. required.
  • skey β€” the Duo secret key. required.
  • groups β€” if you set this, Duo authentication is only required for users whose primary group or supplementary group list matches one of the space-separated pattern-lists (go look at PATTERNS below, iykyk).
  • failmode β€” when service or configuration errors happen and Duo authentication can't go through, do you fail "safe" (allow access) or "secure" (deny access)? default is "safe".
  • pushinfo β€” send the command to be approved via Duo Push authentication. default is "no".
  • http_proxy β€” use the specified HTTP proxy. same format as the HTTP_PROXY environment variable.
  • autopush β€” automatically send a login request to the first factor (usually push), instead of prompting the user. default is "no".
  • verified_push β€” enable support for Duo Verified Push authentication. cannot be used together with autopush. default is "no".
  • prompts β€” set the maximum number of prompts pam_duo will show before denying access. default is 3.
  • fallback_local_ip β€” if it can't detect the authorizing user's IP address, fall back on the server's IP. default is "no".
  • send_gecos β€” instead of using the unix username, send Duo the contents of the GECOS field from /etc/passwd. default is "no".

and here's a whole example config file so you can see the vibe 🫢

[duo]
host = api-deadbeef.duosecurity.com
ikey = SI9F...53RI
skey = 4MjR...Q2NmRiM2Q1Y
pushinfo = yes
autopush = yes

other authentication restrictions may be implemented using pam_listfile(8), pam_access(8), etc. so many options, we love to see it πŸ’œ


🌈 PATTERNS 🌈

a pattern is made of:

  • zero or more non-whitespace characters,
  • '*' β€” a wildcard that matches zero or more characters,
  • or '?' β€” a wildcard that matches exactly one character.

a pattern-list is a comma-separated list of patterns. and bestie, patterns inside pattern-lists can be negated by putting an exclamation mark ('!') in front of them.

so for example, to specify Duo authentication for all users (except those that are also admins), and for guests:

groups = users,!wheel,!*admin guests

periodt. πŸ’…


πŸ“ FILES πŸ“

  • /etc/duo/pam_duo.conf β€” default configuration file path

πŸ‘‘ AUTHORS πŸ‘‘

pam_duo was written by Duo Security <support@duosecurity.com> 🫢


πŸ’€ NOTES πŸ’€

when it's used with OpenSSH's sshd(8), only PAM-based authentication can be protected with this module β€” pubkey authentication bypasses PAM entirely. no cap. 😭

also: OpenSSH's PAM integration does not honor an interactive pam_conv(3) conversation, which prohibits real-time Duo status messages (such as during voice callback). so don't come for this module about that, it literally can't πŸ™ˆ


okay that's the whole thing, you ate it, iconic, main character energy fr fr β­πŸ’–

this page is from Debian, dated September 3, 2010 β€” yeah bestie it's been around a minute, and it's still serving. bye ily πŸŒΈπŸ¦‹πŸ§š

πŸ“¦ where this page comes from
  • epel 10: pam_duo 2.2.3-1.el10_2 Β· GPL-2.0-with-classpath-exception AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND FSFAP AND FSFULLR AND GPL-1.0-only AND LicenseRef-URLEnc-MIT AND MIT AND SSH-short
  • epel 9: pam_duo 2.2.3-1.el9 Β· GPL-2.0-with-classpath-exception AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND FSFAP AND FSFULLR AND GPL-1.0-only AND LicenseRef-URLEnc-MIT AND MIT AND SSH-short
  • fedora 43: pam_duo 2.2.3-1.fc43 Β· GPL-2.0-with-classpath-exception AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND FSFAP AND FSFULLR AND GPL-1.0-only AND LicenseRef-URLEnc-MIT AND MIT AND SSH-short
  • fedora 43: pam_duo 2.2.3-1.fc43 Β· GPL-2.0-with-classpath-exception AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND FSFAP AND FSFULLR AND GPL-1.0-only AND LicenseRef-URLEnc-MIT AND MIT AND SSH-short
  • fedora 44: pam_duo 2.2.3-1.fc44 Β· GPL-2.0-with-classpath-exception AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND FSFAP AND FSFULLR AND GPL-1.0-only AND LicenseRef-URLEnc-MIT AND MIT AND SSH-short
  • fedora 44: pam_duo 2.2.3-1.fc44 Β· GPL-2.0-with-classpath-exception AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND FSFAP AND FSFULLR AND GPL-1.0-only AND LicenseRef-URLEnc-MIT AND MIT AND SSH-short
  • nixos 26.05: duo-unix 2.2.1
  • nixpkgs unstable: duo-unix 2.2.3
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms