Skip to content

Instantly share code, notes, and snippets.

@andrewkroh
Last active April 11, 2017 13:57
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewkroh/8d681e637c8d662fcd2e to your computer and use it in GitHub Desktop.
Save andrewkroh/8d681e637c8d662fcd2e to your computer and use it in GitHub Desktop.
Google Authenticator PAM - Vagrant User SSH Exception
#%PAM-1.0
# Skip Google Authenticator for the vagrant user:
auth [success=1 default=ignore] pam_succeed_if.so user = vagrant
auth required pam_google_authenticator.so
auth required pam_unix.so
auth required pam_sepermit.so
auth include password-auth
account required pam_nologin.so
account include password-auth
password include password-auth
# pam_selinux.so close should be the first session rule
session required pam_selinux.so close
session required pam_loginuid.so
# pam_selinux.so open should only be followed by sessions to be executed in the user context
session required pam_selinux.so open env_params
session optional pam_keyinit.so force revoke
session include password-auth
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment