archiecobbs/mod-authn-otp

Unknown Authn provider: OTP

jsncrdnl opened this issue · 4 comments

I installed mod-authn-otp by:

  • downloading the master
  • extrating it
  • running autogen.sh
  • then configure, make and make install

I added an entry to my apache website config:

` <VirtualHost *:80>

     <Location /var/www/html>

             AuthType basic
             AuthName "My Protected Area"

             AuthBasicProvider OTP
             Require valid-user
             OTPAuthUsersFile /home/_USER_/otp/otp.users

     </Location>
`

But when I try to restart apache2, it's returning me this error:

Unknown Authn provider: OTP
Action 'configtest' failed.

Do you have any idea on what it could be ?

You need to make Apache aware that the mod_authn_otp module exists. Do this via LoadModule, etc.

Thank you for the quick support !

I managed to get the module loaded into apache2 using this command:

sudo apxs -i -a -c mod_authn_otp.c

When I try to start apache I now get the following error:
apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/authn_otp.load: Cannot load /usr/lib/apache2/modules/mod_authn_otp.so into server: /usr/lib/apache2/modules/mod_authn_otp.so: undefined symbol: EVP_sha1

I can confirm that the file located at "/usr/lib/apache2/modules/mod_authn_otp.so" does exist..

This is some kind of build problem. Since you are building the module yourself, you'll have to debug it.

You should not use apxs to build the module directly; instead, use the existing build scripts like before. After that, try using a2enmod to enable it.

Alternatively, look for a pre-built module supplied by your OS vendor. For example, for openSUSE Linux you'd look here. I think pre-built modules exist for Ubuntu somewhere as well. Sorry I can't be more help.

Great, thank you for the pre-build module suggestion !
I searched a bit and found out this pre-build version.

I ran the following commands and it's now fully working:

wget https://launchpad.net/~kalon33/+archive/ubuntu/gamesgiroll/+build/5536859/+files/libapache2-mod-authn-otp_1.1.6+r145-2~ppa14.04+1_amd64.deb
sudo dpkg -i libapache2-mod-authn-otp_1.1.6+r145-2~ppa14.04+1_amd64.deb

Many thanks for the support.

Best regards.