#1
The most common error I have seen in following the instructions is not moving the pam_yubico.so file to the correct directory:
/usr/lib/pam/
If this file isn't there and you edit the authorization file, PAM is looking for a file that doesn't exist and you will be locked out. The newest version of the OS X Login instructions are found here, and include some screenshots from Terminal (
https://www.yubico.com/wp-content/uploa ... gin_en.pdf). Simply running all of the required commands in Terminal isn't sufficient if any of the steps fail.
For example, the step most people error on:
sudo cp /usr/local/Cellar/pam_yubico/<x.xx>/lib/security/pam_yubico.so /usr/lib/pam/pam_yubico.soNOTE: Replace
<x.xx> with Yubico-PAM version number - current as of this writing is
2.20I have seen people get "Operation not permitted" here (typically that means they didn't disable System Integrity Protection) and just continue on with the instructions. If you skip over this error and edit the authorization file, PAM is looking for a file which doesn't exist, hence the lockout. We also strongly recommend creating a Time Machine backup to minimize downtime if the setup isn't successful. I've set up Yubico PAM on several different OS X laptops, and every time I locked myself out it was because I didn't move the yubico_pam.so file.
#2
There are two configuration slots on the YubiKey, so you can only pick two of the following - Yubico OTP (slot 1 default), Static Password, HMAC-SHA1 Challenge-Response, OATH-HOTP. Beyond that, on the NEO and YubiKey 4, there is U2F, PIV, OpenPGP, and OATH (Yubico Authenticator) - none of these are in any way related to the configuration slots.