Hello,
I tried to install two-factor authentication in webmin but I’m getting this error.
Failed to save two-factor authentication : The Perl module Authen::OATH needed for two-factor authentication is not installed. Use the Perl Modules page in Webmin to install it.
I tried to install Perl modules via webmin in Other>Perl modules. I selected google Authenticator and I received an error.
At the end is written:
Installation of Authen::OATH failed. Check the output above and try installing manually.
You can also install the module from CPAN with the command perl -MCPAN -e shell.
I used this guide
https://scunster.co.uk/?p=1411
And I installed, with some dependency problems but at the end I have done it.
yum -y install perl-CPAN
Now, install the following:
perl -MCPAN -e “install Test::Moose”
perl -MCPAN -e “install Types::Standard”
perl -MCPAN -e “install Moo”
perl -MCPAN -e “install Authen::OATH”
I double checked the installation.
[root@localhost download]# yum -y install perl-CPAN
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
-
base: miroir.univ-paris13.fr
-
centos-sclo-rh: mirrors.ircam.fr
-
centos-sclo-sclo: centos.crazyfrogs.org
-
epel: mirror.in2p3.fr
-
extras: mirrors.ircam.fr
-
remi-php73: remirepo.reloumirrors.net
-
remi-safe: remirepo.reloumirrors.net
-
updates: mirrors.ircam.fr
-
webtatic: uk.repo.webtatic.com
Package perl-CPAN-1.9800-294.el7_6.noarch already installed and latest version
Nothing to do
[root@localhost download]# perl -MCPAN -e “install Test::Moose”
Reading ‘/root/.cpan/Metadata’
Database was generated on Sun, 29 Dec 2019 21:41:03 GMT
Fetching with LWP:
http://www.planet-elektronik.de/CPAN/authors/01mailrc.txt.gz
Reading ‘/root/.cpan/sources/authors/01mailrc.txt.gz’
…DONE
Fetching with LWP:
http://www.planet-elektronik.de/CPAN/modules/02packages.details.txt.gz
Reading ‘/root/.cpan/sources/modules/02packages.details.txt.gz’
Database was generated on Wed, 08 Jan 2020 21:55:18 GMT
…
New CPAN.pm version (v2.27) available.
[Currently running version is v1.9800]
You might want to try
install CPAN
reload cpan
to both upgrade CPAN.pm and run the new version without leaving
the current session.
…DONE
Fetching with LWP:
http://www.planet-elektronik.de/CPAN/modules/03modlist.data.gz
Reading ‘/root/.cpan/sources/modules/03modlist.data.gz’
DONE
Writing /root/.cpan/Metadata
Test::Moose is up to date (2.2012).
[root@localhost download]# install CPAN
install: missing destination file operand after ‘CPAN’
Try ‘install --help’ for more information.
[root@localhost download]# perl -MCPAN -e “install Types::Standard”
Reading ‘/root/.cpan/Metadata’
Database was generated on Wed, 08 Jan 2020 21:55:18 GMT
Types::Standard is up to date (1.008001).
[root@localhost download]# perl -MCPAN -e “install Moo”
Reading ‘/root/.cpan/Metadata’
Database was generated on Wed, 08 Jan 2020 21:55:18 GMT
Moo is up to date (2.003006).
[root@localhost download]# perl -MCPAN -e “install Authen::OATH”
Reading ‘/root/.cpan/Metadata’
Database was generated on Wed, 08 Jan 2020 21:55:18 GMT
Authen::OATH is up to date (2.0.1). >>>> Attention <<<<<
[root@localhost download]#
The thing is that I restarted webmin, and the virtual machine and Im still getting the same error:
Failed to save two-factor authentication : The Perl module Authen::OATH needed for two-factor authentication is not installed. Use the Perl Modules page in Webmin to install it.
How is this possible?
The thing is that I already used this method in another virtual machine and it worked(now this vm is not available)
Thank you
Regards.