From d8f0ba314b3dfb2b45648d581a6bf7c981f94b5c Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Thu, 25 May 2017 21:29:16 -0600 Subject: [PATCH] Change #! to python3, show 2fa numbers when typed --- pam_custom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pam_custom.py b/pam_custom.py index 249112e..c516730 100644 --- a/pam_custom.py +++ b/pam_custom.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ''' pam-custom @@ -39,7 +39,7 @@ def totp_check(user, pamh): resp = requests.post(api_url, data=req) if resp.json()['status'] == "OK": if resp.json()['otp'] == True: - otpmsg = pamh.Message(pamh.PAM_PROMPT_ECHO_OFF, "[Portal] enter 2-factor auth code for " + user + ": ") + otpmsg = pamh.Message(pamh.PAM_PROMPT_ECHO_ON, "[Portal] enter 2-factor auth code for " + user + ": ") rsp = pamh.conversation(otpmsg) otpcode = rsp.resp return totp_verify(user, otpcode)