Git Product home page Git Product logo

pam_otp_session's Introduction

PAM OTP session

This set of script allow PAM to remember that an user is already successfully authentified against a two (plain text) factor auth system. Useful when an app remembers the credential for the user, as browsers with basic auth or IMAP clients etc usualy do.

Installation

Make sure you have the pam_script.so available on your system. You can get it on Debian-like-systems by installing the libpam-script package or by compiling it from this Github repo : jeroennijhof/pam_script.

Put the two scripts contained in scripts in a folder. Then point pam_script.so to it in your auth description in /etc/pam.d/, as auth sufficient then to account sufficient, as shown in the example :

# first call the the scripts, set to 'auth sufficient'
auth	sufficient		pam_script.so dir=/path/to/pam_otp_session/

# begin normal two factor authentification (with Yubico OTP here)
auth    required		pam_yubico.so try_first_pass id=16 authfile=/path/to/authorized_yubikeys url=https://api.yubico.com/wsapi/2.0/verify?id=%d&otp=%s
#auth  	required		[put here further authentification]
#auth	required		(against database, unix password system, etc)
#auth	required		...
# ed normal two factor authentification

# second call if auth succeed, set to 'account sufficient' (sufficient or whatever)
account	sufficient		pam_script.so dir=/path/to/pam_otp_session/

And you're good.

Usage examples

Works well with Nginx (ngx_http_auth_pam_module) or with Postfix and Dovecot.

Problems ?

Open an issue !

Should be good using Google Auth and other OTP providers, otherwise, open an issue !

(Problems with Yubico PAM module ? Yubico/yubico-pam.)

pam_otp_session's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.