Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

License

NotificationsYou must be signed in to change notification settings

fuzhenxin/google-authenticator-libpam-remote-verification

Repository files navigation

The original google-authenticator-libpam verifies the code in the login server. If the server is hacked, all the secret will be lost. To improve the security for the system, the code is modified to verify the code in remote server. The code is sent to another python socket server called ClientServer through unix file. The the code then is sent to Server to verify. The Server connects with mysql to get the otp secret to verify.

Install google-authenticator-libpam

cd google-authenticator-libpam./bootstrap.sh./configuremakecp .libs/pam_google_authenticator.so /usr/lib64/security

Config google-authenticator-libpam

  1. Theuser parameter must be set in/etc/pam.d/sshd
  2. Thesocket parameter must be set to connect with ClientServer and is should be the same withSOCK_ADDR inconfig.py
  3. Other setting is the same in original google-authenticator-libpam
  4. The following parameters do not work any more: secret, noskewadj, grace_period
  5. Example:auth required pam_google_authenticator.so user=otp socket=/tmp/sock1

Run Servers

  1. Server:python3 OTPServer.py server in a verification server which can connect to mysql.
  2. ClientServer:sudo -u username python3 OTPServer.py client in the login server.username should be the same with user in/etc/pam.d/sshd

OTP Utils

  1. python3 OTPServer.py util new username set new otp secret the speficy user.
  2. python3 OTPServer.py util get username get otp secret the speficy user.
  3. python3 OTPServer.py util verify username otpcode verify the otpcode for a specific user.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp