hcarsten / google-authenticator-apache-module

Automatically exported from code.google.com/p/google-authenticator-apache-module
0 stars 0 forks source link

Secret Key is "(null)" - cannot authenticate #5

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I've built the most recent revision: r10. However, I cannot seem to get this to 
work, and looking at the error log it says Secret Key is "(null)".  Here is my 
auth file:

NNJITK6UBX4EEKHH
" TOTP_AUTH
50039494
27219159
58297638
85255199
44013977

Here is the output:
[Fri Apr 05 02:51:08 2013] [error] [client 192.168.1.1] **** COOKIE AUTH at  
T=1365130268
[Fri Apr 05 02:51:08 2013] [error] [client 192.168.1.1] **** PW AUTH at  
T=1365130268  user  "ryan"
[Fri Apr 05 02:51:08 2013] [error] [client 192.168.1.1] Secret Key is "(null)" 
@ T=45504342
[Fri Apr 05 02:51:08 2013] [error] [client 192.168.1.1] Checking codes  @ 
T=45504342 "540324" vs.  "16740"
[Fri Apr 05 02:51:08 2013] [error] [client 192.168.1.1] Checking codes  @ 
T=45504342 "416549" vs.  "16740"
[Fri Apr 05 02:51:08 2013] [error] [client 192.168.1.1] Checking codes  @ 
T=45504342 "463812" vs.  "16740"
[Fri Apr 05 02:51:08 2013] [error] [client 192.168.1.1] Checking codes  @ 
T=45504342 "759680" vs.  "16740"
[Fri Apr 05 02:51:08 2013] [error] [client 192.168.1.1] Checking codes  @ 
T=45504342 "978939" vs.  "16740"
[Fri Apr 05 02:51:08 2013] [error] [client 192.168.1.1] Validating for  
"016740" Shared Key  "(null)"
[Fri Apr 05 02:51:08 2013] [error] [client 192.168.1.1] user ryan: 
authentication failure for "/phpmyadmin/": Password Mismatch
[Fri Apr 05 02:51:23 2013] [error] [client 192.168.1.1] **** COOKIE AUTH at  
T=1365130283
[Fri Apr 05 02:51:23 2013] [error] [client 192.168.1.1] **** PW AUTH at  
T=1365130283  user  "ryan"
[Fri Apr 05 02:51:23 2013] [error] [client 192.168.1.1] Secret Key is "(null)" 
@ T=45504342
[Fri Apr 05 02:51:23 2013] [error] [client 192.168.1.1] Checking codes  @ 
T=45504342 "540324" vs.  "379161"
[Fri Apr 05 02:51:23 2013] [error] [client 192.168.1.1] Checking codes  @ 
T=45504342 "416549" vs.  "379161"
[Fri Apr 05 02:51:23 2013] [error] [client 192.168.1.1] Checking codes  @ 
T=45504342 "463812" vs.  "379161"
[Fri Apr 05 02:51:23 2013] [error] [client 192.168.1.1] Checking codes  @ 
T=45504342 "759680" vs.  "379161"
[Fri Apr 05 02:51:23 2013] [error] [client 192.168.1.1] Checking codes  @ 
T=45504342 "978939" vs.  "379161"
[Fri Apr 05 02:51:23 2013] [error] [client 192.168.1.1] Validating for  
"379161" Shared Key  "(null)"
[Fri Apr 05 02:51:23 2013] [error] [client 192.168.1.1] user ryan: 
authentication failure for "/phpmyadmin/": Password Mismatch

I've been trying for the past couple hours now, and try to tweak the underlying 
code (I was able to hardcode the key as char *sharedKey=NNJITK6UBX4EEKHH; 
instead of NULL in ga_check_password), but as I'm not too familiar with C I was 
limited to what I could do.

I made a new auth file and scanned the code with a QR reader, so I know the 
settings on the phone are correct

Original issue reported on code.google.com by ryan.xga...@gmail.com on 5 Apr 2013 at 2:52

GoogleCodeExporter commented 9 years ago
I meant to format the issue a bit better, but totally forgot and now I can't 
seem to edit it. oh well =/

Original comment by ryan.xga...@gmail.com on 5 Apr 2013 at 2:53

GoogleCodeExporter commented 9 years ago
Please disregard this issue. It would appear that my NTP daemon was not working 
properly, and my system clock was offset +355 seconds. I've corrected this 
issue and now everything works great. However, debug still says Secret Key is 
"(null)" which might be worth fixing ;)

Original comment by ryan.xga...@gmail.com on 5 Apr 2013 at 5:03

GoogleCodeExporter commented 9 years ago
Glad you got it working! :)

I will:

1. Make the "Secret Key (null)" message more descriptive
2. Update the wiki to mention checking NTP/time sync in troubleshooting. 

Original comment by bkgood...@gmail.com on 5 Apr 2013 at 12:51

GoogleCodeExporter commented 9 years ago
I should also make some of the debug output a runtime configuration option.

Original comment by bkgood...@gmail.com on 16 Apr 2013 at 3:02