How can I avoid hard-coding YubiKey user identities into the PAM stack?

Posted by CodeGnome on Super User See other posts from Super User or by CodeGnome
Published on 2012-05-14T00:19:53Z Indexed on 2012/06/06 10:43 UTC
Read the original article Hit count: 295

Filed under:
|

The Yubico PAM Module seems to require changes to the PAM stack for each user that will be authenticated with a YubiKey. Specifically, it seems that each user's client identity must be added to the right PAM configuration file before the user can be authenticated.

While it makes sense to add authorized keys to an authentication database such as /etc/yubikey_mappings or ~/.yubico/authorized_yubikeys, it seems like a bad practice to have to edit the PAM stack itself for each individual user. I would definitely like to avoid having to hard-code user identities into the PAM stack this way.

So, is it possible to avoid hard-coding the id parameter to the pam_yubico.so module itself? If not, are there any other PAM modules that can leverage YubiKey authentication without hard-coding the stack?

© Super User or respective owner

Related posts about linux

Related posts about pam