User Tools

Site Tools


Get the software:

apt-get install gcc mercurial libpam0g-dev -y

Compile the PAM module:

cd google-authenticator/libpam/
make install

Now apply the PAM module to one of your authentication mechanisms (sshd, ppp, samba or what ever you have in /etc/pam.d):

vi /etc/pam.d/sshd

and append this to the file sshd:

auth required

You can disable the 2-factor login by appending these two lines:

auth [success=1 default=ignore] accessfile=/etc/security/access-local.conf
auth       required

In the file /etc/security/access-local.conf you can add the following to skip 2-factor for the network

+ : ALL :
- : ALL : ALL
indexes/google_authenticator.txt · Last modified: d/m/Y H:i by domingo