If you have trouble installing two factor from within Webmin you need to first install Perl-CPAN.
I have come across this issue in both CentOS and Debian.
Open shell and issue the following commands:
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"
Now go ahead and install 2 factor auth within Webmin
thank you so much, your solution works. i have google many website but all steps failed.
Very good explanation. Thank you!