How to add custom two-factor authentication using C ++, Pam & Ubuntu?

I want to add my own two-factor authentication to my ubuntu Linux server using C ++. I’m going to have an asterisk box call my mobile phone with a unique identifier, which must be entered at the Linux login prompt, before or after the password, with (or) without a certificate - depending on how I configure it. In any case, I would like this additional input step to be part of the input.

Should I use PAM for this? If so, can someone point me to a sample of additional input w / Pam and login?

+4
source share
3 answers

I wrote a C ++ application to change the password of the accounts listed in the MySQL database as β€œPin Number” + OpenSSL Library RNG to create an 8-letter password - it combines them and forces a password change every 60 seconds.

0
source

The two-stage auth Duo (my employer) is available for 10 users or for any open source project. It includes a utility that can add additional authentication to log in to SSH, as well as support for API C and PAM.

http://blog.duosecurity.com/2011/04/announcing-duos-two-factor-authentication-for-unix/

+2
source

I would take a look at the Moxie Marlinspike Barada , which uses the Android app and the PAM module for two-factor authentication using HOTP . The source of the Barada PAM module may be useful to you.

+1
source

Source: https://habr.com/ru/post/1344711/


All Articles