Skip to content

Linux Pluggable Authentication Module (PAM) for totp authentication

Notifications You must be signed in to change notification settings

OdaiGH/pam-totp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

pam-totp

PAM TOTP is a Linux Pluggable Authentication Module (PAM) that enables 2fa using a Time-based OTP method

Installation

auth requisite pam_python.so /PATH/TO/THE/CODE/pam_totp.py

to the end of file /etc/pam.d/common-auth

Setup

each user must have his own secret key use and we will do this by using this command:

usermod user -c "abcdabcd"

now when you switch to user by using

su user

it will ask for both your password and your otp

image

even ssh reqiures you to enter your otp

image

use this website to verify your otp https://totp.app/

you could also use google authenticator, you just need to add your key