Jump to content

2-Step Authentication For Just Some Users


MFVX
 Share

Recommended Posts

I have enabled google-2-step authentication on /etc/pam.d/sshd , but I want to know if there is any way I can create an exception to allow some specific users to login without using this method of authentication.

Link to comment
Share on other sites

Ok, there is a fix for this here .

It uses a patch . I can't guarantee this patch is safe, but it seems to work fine on my Centos installation.


wget http://google-authenticator.googlecode.com/files/libpam-google-authenticator-1.0-source.tar.bz2
tar -xvf
cd libpam-google-authenticator-1.0

nano ignore_nofile.patch
#paste the contents of the patch, then ctrl + x, Y.

patch < ignore_nofile.patch
make
make install

service sshd restart
[/CODE]

Then, if the user you are trying to login haven't set up his 2-step authentication with

[CODE]
google-authenticator
[/CODE]

The system will jump to password authentication.

Edited by MFVX
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...