Open abrkn opened 8 years ago
I'm experiencing this exact same error with 2.20 on Ubuntu 16.04. It's infuriating to see [pam_yubico.c:pam_sm_authenticate(1095)] done. [Success]
and then have PAM deny the login with no useful debugging output. I feel like I'm running Windows again.
/etc/pam.d/common-auth
#
# /etc/pam.d/common-auth - authentication settings common to all services
#
# This file is included from other service-specific PAM config files,
# and should contain a list of the authentication modules that define
# the central authentication scheme for use on the system
# (e.g., /etc/shadow, LDAP, Kerberos, etc.). The default is to use the
# traditional Unix authentication mechanisms.
#
# As of pam 1.0.1-6, this file is managed by pam-auth-update by default.
# To take advantage of this, it is recommended that you configure any
# local modules either before or after the default block, and use
# pam-auth-update to manage selection of other modules. See
# pam-auth-update(8) for details.
# here are the per-package modules (the "Primary" block)
# auth [success=1 default=ignore] pam_unix.so nullok_secure
auth include yubikey
# here's the fallback if no module succeeds
auth requisite pam_deny.so
# prime the stack with a positive return value if there isn't one already;
# this avoids us returning an error just because nothing sets a success code
# since the modules above will each just jump around
auth required pam_permit.so
# and here are more per-package modules (the "Additional" block)
# end of pam-auth-update config
/etc/pam.d/yubikey
auth required pam_yubico.so authfile=/etc/yubikey_mappings id=<my id> key=<my generated key> debug
I figured it out, it turns the docs are wrong for Ubuntu 16.04. (I don't know what exactly changed, and frankly I don't care since it's working.)
auth [success=1 default=ignore] pam_yubico.so authfile=/etc/yubikey_mappings id=<my id> key=<my generated key>
@Manouchehri can you share what you changed so others know how to fix the problem you ran into?
It's been over two years since I had this problem and I honestly don't remember it, but I'd assume editing /etc/pam.d/yubikey
with the content I wrote in https://github.com/Yubico/yubico-pam/issues/86#issuecomment-209221647 was the fix.
@ctodd did it work for you what @Manouchehri did in comment above?
@rmldsky my issue was different and was related to changes in OpenVPN, the Viscosity VPN client, and a necessary upgrade to 2.4. There is also an additional configuration option auth-gen-token required to enable token based re-authentication (i.e. the Yubikey OTP expires before the re-authentication which occurs ever hour when the TLS keys are renegotiated.
https://www.sparklabs.com/support/kb/article/advanced-configuration-commands/
Hope this helps.
I'm trying to harden an OpenVPN installation by adding yubikey otp. Clients currently authenticate using client certificates. I'd like to require yubikey otp on top of that, in case someone's computer is stolen. When turning on the plugin and connecting, I experience this error (openvpn log):
Plugin log:
/etc/pam.d/openvpn
:/etc/openvpn/udp-otp.conf
: