Added two-factor authentication, i think last access, but not 100%. Anyway, 2fa is failing about Authen::OATH

SYSTEM INFORMATION
OS type and version Rocky Linux 9.2
Webmin version 2.021
Virtualmin version 7.7 Pro

Warning!
Two-factor authentication failed : Missing Perl module Authen::OATH

Following this to get it working…

yum -y install perl-CPAN
perl -MCPAN -e “install Test::Moose”
perl -MCPAN -e “install Types::Standard”
perl -MCPAN -e “install Moo”
perl -MCPAN -e “install Authen::OATH”

Should enabling 2fa warn you about Authen::OATH or is that a separate issue?

Don’t use CPAN!

1 Like

Why not use CPAN? When I looked on the other 2 servers i have, they had had cpan installed. With 3 servers set up with the exact same image and updates, I was wondering why this particular one was missing CPAN compared to the other 2.

The only other difference is one is VM Pro (the one with the issue) and other 2 are not.

Not 100% sure, just posting solution from forum.

This difficulty I have since I started.
I followed a lot of information from the forum and NEVER managed to make it work.
I have already asked here who had managed to install and have effective authentication and no one spoke up properly.
Two-factor authentication is used in many locations, websites, platforms, etc.
Is it possible @staff this subject to be properly verified with user tests and responses?

Thanks, I have edited linked above post and marked it as a solution!

There should be nothing done in addition to activate 2FA in the latest Webmin versions, because Authen::OATH Perl module bundled with Webmin already!

1 Like

Try my installation steps and see if it works.

What were your installation steps exactly? Because I actually tested it on my Rocky 9.2 earlier today, and 2FA worked just fine! If it doesn’t work for you on clean Rocky 9.2, I’d be interested to have a closer look at such instance and/or know exact steps to reproduce the issue.

Like i posted, the only difference in the install is that the offending system had Pro VM. I can’t show a causal relationship, but I think my logs might show an issue. But nobody wants to look at my logs.

I can not see a post containing logs at all. How can anyone view an invisible log ?

This cannot be right because Virtualmin GPL and Virtualmin Pro uses the same version Webmin!

I would suggest not to break your system by installing Perl modules from source and use package manager. Although, in case of Authen::OATH Perl module you don’t need to do anything, as it is already bundled with Webmin!

According to your information, should I delete the module pointed out in the screenshot below?

The answer is – no! Webmin Perl Moules module would also delete a system package if there was one installed, i.e. libauthen-oath-perl.

Please stop breaking things and create new problems!

Unless you’re sure that the installation source was CPAN. You can see the source the Perl module (package) was installed from by clicking on the package name from the screenshot you shared above, i.e.:

I’m sorry I caused this scenario.
The goal here is to clarify and solve the doubts.
Thank you.

Dude, I was trying to get my server working. I said I should have done analysis before installing CPAN. Chill man.

There was no request for them. Seems the agenda in this forum is CPAN, so I will find out another way. I don’t need this scrutiny.

Sorry for giving the wrong impression. I’m cool.

The only problem on my side is that similar posts can trick other users into doing things they shouldn’t do.

Is there a way for you to uninstall whatever was installed using CPAN, try enabling 2FA in Webmin Configuration page and share the exact error message?

I should be able to do one better. I am restoring my system to almost 3 day ago (09/11 02:00) to see if I can recreate the error. Should have image back up in 20 min.

I restored my server back before CPAN update:

[root@mail ~]# locate OATH
/usr/libexec/usermin/vendor_perl/Authen/OATH.pm
/usr/libexec/webmin/vendor_perl/Authen/OATH.pm

https://vavias.com:10000

Login ok.

Warning!
Two-factor authentication failed : Missing Perl module Authen::OATH
Webmin
Two-factor authentication has been enabled for this user to login

Token