If I install CPAN OATH, it will let me log in.
Iām more interested to see the output of:
perl -I/usr/libexec/webmin/vendor_perl -e "use Authen::OATH;"
ā¦ before anything from CPAN is installed. Could you do that for me?
No return. i put a space between the -I and /usr and still nothing.
Still locate:
[tom@mail ~]$ sudo locate OATH
/usr/libexec/usermin/vendor_perl/Authen/OATH.pm
/usr/libexec/webmin/vendor_perl/Authen/OATH.pm
[tom@mail ~]$ sudo perl -I/usr/libexec/webmin/vendor_perl -e āuse Authen::OATH;ā
[sudo] password for tom:
[tom@mail ~]$ sudo locate OATH
/usr/libexec/usermin/vendor_perl/Authen/OATH.pm
/usr/libexec/webmin/vendor_perl/Authen/OATH.pm
[tom@mail ~]$ sudo perl -I /usr/libexec/webmin/vendor_perl -e āuse Authen::OATH;ā
[tom@mail ~]$
If there is no output it means that everything is working as expected.
However, you say it donāt? What exactly happens if you go to Webmin ā¾ Webmin Configuration: Two-Factor Authentication page, select Google Authenticator and hit save. What exact error do you get? Can you provide screenshots?
Warning!
Two-factor authentication failed : Missing Perl module Authen::OATH
Webmin
Two-factor authentication has been enabled for this user to login
Token
I canāt login.
Can I disable 2fa via command line?
From my other server āns1ā:
[tom@ns1 ~]$ perl -I/usr/libexec/webmin/vendor_perl -e āuse Authen::OATH;ā
[tom@ns1 ~]$ perl -I /usr/libexec/webmin/vendor_perl -e āuse Authen::OATH;ā
[tom@ns1 ~]$ sudo locate OATH
[sudo] password for tom:
/usr/libexec/webmin/vendor_perl/Authen/OATH.pm
[tom@ns1 ~]$
This one is working with 2fa.
Could there be a conflict between:
/usr/libexec/usermin/vendor_perl/Authen/OATH.pm
/usr/libexec/webmin/vendor_perl/Authen/OATH.pm
Because i am not using usermin on my ns1 and ns2 hosts.
[tom@ns1 ~]$ sudo locate OATH
[sudo] password for tom:
/usr/libexec/webmin/vendor_perl/Authen/OATH.pm
Here is /var/log/messages from past wheneverā¦
messages.log (1.2 MB)
Iām going to have to change my DNS for a domain if canāt access the control panel, so I will probably just install CPAN to get that done if there isnāt a prompt resolution. I need an email address set up which I canāt do without Webmin access but I could do alternatively by using my host MX.
I would expect to have had questions about actual code references for why this isnāt working. At least a comparison of Perl scripts. There is obviously a call that is bad in the web coding for 2fa. Which files can I send you to compare?
I could do the code analysis, but I bought the premium support so I donāt have to.
If you apply this patch how does the actual error message looks like? Can I see the screenshot?
I can now also see that we havenāt removed perl-Authen-OATH
package from the Virtualmin repos!
@Joe, you should remove perl-Authen-OATH
package from the Virtualmin repos because this Perl package is bundled with Webmin.
If the package causes problems, then itās a bug (in Webmin, not the repo). It should never be a problem to also have a package installed of a given Perl module.
Itās not causing any issues! Itās simply redundant.
@tommack can you try applying this patch : Show full error if Authen::OATH cannot be loaded Ā· webmin/webmin@2e8000d Ā· GitHub
Then try logging in again, and post the full error message you get, which should show more details about why twofactor is failing.
@Jamie, $@
wonāt be printed as part of <pre></pre>
from your latest patch! Besides, it wonāt look nice with the new bubble in error messages. We would need to capture $@
immediately.
Anyway, I have fixed all of that in the latest patches, and also fixed a few minor bugs I introduced some time ago. Now, if a new $main::error_last_eval
is set, then error()
function will display a nice HTML accordion and will include the full error message, e.g.:
If $main::error_last_eval
isnāt set explicitly then the file and line (this time correctly) will be shown in the bubble, e.g.:
@tommack Donāt apply any of the patches we mentioned recently. Itās just too much to apply. Instead, you can try this devel build of Webmin which would include all recent changes.
Please let us know which error message do you see then by sharing a screenshot.
OK, so we are all in agreement, I will install the RPM posted above?
I have not touched the system since I did the restore.
Donāt install perl-Authen-OATH
packageā¦ Just upgrade with the devel Webmin package suggested above. Then go to Webmin Configuration / 2FA page and try to activate it, and then post the error.
Installed, still getting:
Warning!
Two-factor authentication failed : Missing Perl module Authen::OATH
Here is the log from the install:
webminins.zip (1.7 KB)
What is the output of webmin -v
command?
Failed to open /etc/webmin/miniserv.conf
Sorry forgot to sudo:
2.102
There were def problems with the install.