Using Webmin 1.690 on Debian 8.0 (Jessie/Testing) / Linux 3.14-1-amd64
Two-factor provider has been set to Google Authenticator, but Web UI throws the error "Failed to setup two-factor authentication : " after attempting to enroll any user for two-factor authentication. miniserv.error reveals the following:
Use of uninitialized value $acl::in{"user"} in concatenation (.) or string at /usr/share/webmin/acl/twofactor_form.cgi line 50.
Use of uninitialized value $secret in pattern match (m//) at /usr/share/webmin/webmin/webmin-lib.pl line 2371.
Development version 1.692 has the same issue.
Can you add the line error_stack=1 to the file /etc/webmin/config , re-try the enrollment, and then post the full error message here?
Sure!
Call Stack Trace
File Line Function
/usr/share/webmin/acl/save_twofactor.cgi 81 WebminCore::error
(eval 34) 6 (eval)
/usr/share/webmin/miniserv.pl 2352 (eval)
/usr/share/webmin/miniserv.pl 909 miniserv::handle_request
Ok, I thing I see the issue. Make sure what when enrolling for two-factor, you click the "Enroll For Two-Factor Authentication" button instead of just hitting enter in the text box.
This will be properly fixed in the next release.
I have actually been clicking the button all along. I had never thought to hit enter in the text box, but I get the exact same stack trace when I do. No change when switching from a randomly generated key to a manually entered one either.
Ok, maybe the problem is something else. What's odd is that on my test system with Google Authenticator, I wasn't able to trigger any error..
Is there anything special about the user you are logged in as?
Nothing in particular, happened as root and a sudoer. Since you couldn't reproduce it, I decided to purge everything and reinstall Webmin. Two-factor authentication is working fine now, hopefully it will stay that way once I get everything reconfigured. No idea what happened there.
Ok, I guess we can call this fixed then.