alexandregz / twofactor_gauthenticator

This RoundCube plugin adds the 2-step verification(OTP) to the login proccess
MIT License
221 stars 79 forks source link

Roundcube 1.3.16/Debian 10 Buster - plugin is missing #142

Open kozaq opened 3 years ago

kozaq commented 3 years ago

Hello,

I have Roundcube 1.3.16 on Debian 10 Buster. I followed the instruction and get the files from 1.3.9 branch. I also added 'twofactor_gauthenticator' in config.inc.php. When logged in to RC/Settings plugin is missing. Default PHP version on Debian 10 is 7.3. Could anyone advise what I could have made wrong? Appreciate any advise.

Thanks in advance

exsilium commented 3 years ago

I had the same issue. Make sure you edit the plugins/twofactor_gauthenticator/config.inc.php file. In my case I had a prefilled configuration of users_allowed_2FA which effectively did not enable the plugin to me.

j-ed commented 3 years ago

To activate a Roundcube plugin, you first need to add its name to the configuration parameter "$config['plugins'] = ..." 😉

exsilium commented 3 years ago

To my understanding he already added and activated the plugin in the main config.inc.php file...

kozaq commented 3 years ago

Thanks for your input. Plugin is activated by adding it's name to /etc/roundcube/config.inc.php so it looks like this:

$config['plugins'] = array(
        'managesieve',
        'password',
        'twofactor_gauthenticator',
);

Next I copied config.inc.php.dist to /etc/roundcube/plugins/twofactor_gauthenticator/config.inc.php and in the last line added my email address: $rcmail_config['users_allowed_2FA'] = array('name@domain.org');

Restarted apache2 (not needed I think) but still no luck. What else could I miss? I think this must be something trivial.

@exsilium: Did you experienced the same problem on Debian 10 and RC 1.3.16 installed from apt?

exsilium commented 3 years ago

Are you actually logging in to RC using the format name@domain.org? If you just use the unix username to login then just enter the username name for the users_allowed_2FA variable. Restarting the webserver is not necessary.

I'm not using apt version. Running 1.4.11 and installed via composer to an Ubuntu Xenial.

kozaq commented 3 years ago

That's correct - I use name@domain.org.

Have you changed also other parameters except $rcmail_config['users_allowed_2FA'] in /etc/roundcube/plugins/twofactor_gauthenticator/config.inc.php?

exsilium commented 3 years ago

In my case no other changes were needed. Unfortunately I don't have any other ideas what could be stopping the plugin to display settings.

kozaq commented 3 years ago

Thanks anyway. Just to double check - you too have two config.inc.php files? First in /etc/roundcube/config.inc.php and the second in /etc/roundcube/plugins/twofactor_gauthenticator/config.inc.php?

exsilium commented 3 years ago

That is correct - The main config and the plugin config file as you described.

Because of the standalone installation the locations are different from yours as the configs reside in the same location as the RC app:

Worth while to double check that the plugin config resides in the correct place - I recall seeing them in /usr/share/roundcube/ and/or /var/lib/roundcube/plugins/ depending from the system and package manager used.

bangger commented 3 years ago

Hi, I have tried same on roundcube 1.3.15 cpanel installed on centos. Below are config url for both RC and plugin. /usr/local/cpanel/base/3rdparty/roundcube/config.inc.php /usr/local/cpanel/base/3rdparty/roundcube/plugins/twofactor_gauthenticator/config.inc.php

added to RC config file: $config['plugins'] = array('twofactor_gauthenticator',);

added to RC plugin twofactor_gauthenticator config file: $rcmail_config['users_allowed_2FA'] = array('name@mydomain.com');

I have tried both manual installation and through composer but failed. Any suggestions will be appreciated. thanks

bangger commented 3 years ago

Hello Guys,

Finally its working now. I just tried git checkout 1.3.9-version

every thing is working fine for me now.

j-ed commented 3 years ago

added to RC config file: $config['plugins'] = array('twofactor_gauthenticator',);

I don't know if it has an impact on the result but you shouldn't add a comma behind the last entry of an array. E.g.

$config['plugins'] = array('twofactor_gauthenticator');

mrozekma commented 2 years ago

I had the same issue. Make sure you edit the plugins/twofactor_gauthenticator/config.inc.php file. In my case I had a prefilled configuration of users_allowed_2FA which effectively did not enable the plugin to me.

This is the problem. Not sure why the plugin ships with the default it does, but I changed it to:

$rcmail_config['users_allowed_2FA'] = array('.*');