I am configuring yubico-pam to enable passwordless sudo access using challenge-response from a Yubikey. The following works:
# /etc/pam.d/sudo
auth sufficient pam_yubico.so mode=challenge-response
auth required pam_opendirectory.so
account required pam_permit.so
password required pam_deny.so
session required pam_permit.so
unless the pam_yubico.so module is missing, uninstalled, or corrupted, in which case one is told:
$ sudo su -
sudo: unable to initialize PAM: No such file or directory
Is it possible to tell PAM to ignore a module that is missing, rather than simply returning immediately and prevent PAM from continuing to evaluate the stack?