Home Servers Fix WebMin Two Factor Authentication Authen::OATH Issue

Fix WebMin Two Factor Authentication Authen::OATH Issue

2
0
155

Updated 12AUG2017:

WebMin Two Factor Authen::OATH issue can be a killer for patience. After installing WebMin, you must increase security of your WebMin panel. This can be done easily by setting-up WebMin Two Factor authentication. However, this may give many different errors. One of the irritating one is Authen::OATH perl module error.

When you select “Google Authenticator” and press Next, then you may have got below error,

Perl module Authen::OATH needed for two-factor authentication is not installed.
WebMin two factor
WebMIn Authen::OATH Perl Module Issue

Clicking on the link “Perl Modules” will install it from source but then again there may be other dependencies errors. Like below,

Can't locate ExtUtils/MakeMaker.pm

If you go back to WebMin config and click the Two Factor again, then WebMin will tell you that perl module “Authen::OATH” is still missing. This will keep happening no matter how many times you try it.

Reasons are simple and can be any one or all of below,

  1. You are missing Perl modules like Moose, Digest or Build package.
  2. Authen::OATH is not being installed properly.
  3. You are not restarting WebMin core after OATH installation.

Last one seems very silly but it is the main problem as Authen::OATH is being installed from source and will not be detected by WebMin unless core is restarted.

Tweet this with a click and tell it to WebMin developers,

Try to restart the WebMin service using SSH after Authen::OATH installation and your issue should get fixed. If not then follow the below steps to install it correctly.

Install Perl Packages

Using SSH (shell), enter these commands one by one,

yum install gcc
yum install 'perl(Moose)'
yum install 'perl(Digest::HMAC)'
yum install 'perl(Module::Build)'

This will install all required perl packages for Source build and supporting WebMin Two Factor Authentication.

Note: If you get error “No package perl(Moose) available” then please go through this short guide to install perl-Moose from tar package.

Pull Authen::OATH source package and Unzip it

Now, you must pull fresh package from CPAN,

wget http://www.cpan.org/authors/id/S/SI/SIFUKURT/Authen-OATH-v1.0.0.tar.gz

Unzip it using,

tar -xvf Authen-OATH-v1.0.0.tar.gz

Extract, Build & Install Authen::OATH Perl Package

Change the directory to newly extracted folder. In my case, I issued following command,

cd Authen-OATH-v1.0.0

Enter these commands one by one,

perl Build.PL
./Build
./Build test
./Build install

Restart WebMin – Very Important.

service webmin restart

Now, go back and try the WebMin Configuration -> Two Factor -> Select Google Authenticator and press Next.

This should now work and WebMin should declare that is now restarting.

You can follow this amazing guide to Setup WebMin 2Fa for users.

2 Comments

  1. Charlie Meson

    November 22, 2015 at 1:40 pm

    Was facing this stupid webmin two factor authentication issue since long time. Thanks to you that I am now able to login to my webmin panel.

    Reply

    • Mrinal Buddekar

      November 22, 2015 at 2:13 pm

      Welcome Charlie.

      Reply

Don't hesitate. Comment!

Check Also

Install CSF Firewall with Virtualmin Module

Managing Linux firewall can be pain without graphic interface. ConfigServer firewall comes…