Author Topic: How to disable 2FA for dedicated user  (Read 323 times)

Offline cmonty14

  • Newbie
  • *
  • Posts: 4
How to disable 2FA for dedicated user
« on: February 21, 2020, 04:08:29 AM »
Hi,
I need to disable 2FA for a dedicated user because this user has lost his authentication code.
The intention is to allow this user to login with password only and then create a new 2FA authentication code.

Can you please advise how to disable 2FA for a user?

THX

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,385
Re: How to disable 2FA for dedicated user
« Reply #1 on: February 22, 2020, 03:21:44 AM »
Please contact the author of the 2FA plugin you are using or your email provider.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline cmonty14

  • Newbie
  • *
  • Posts: 4
Re: How to disable 2FA for dedicated user
« Reply #2 on: February 22, 2020, 06:35:24 AM »
The author of the plugin provides this solution:
"Remove from the roundcube DB users.preferences the 2fa configuration."

However, I don't know the correct SQL syntax for this to apply.

Please advise.

THX

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,385
Re: How to disable 2FA for dedicated user
« Reply #3 on: February 22, 2020, 09:24:55 AM »
There is a script called bin/moduserprefs.sh which is shipped with Roundcube which can be used to modify a specific users' preferences.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline cmonty14

  • Newbie
  • *
  • Posts: 4
Re: How to disable 2FA for dedicated user
« Reply #4 on: February 22, 2020, 01:40:06 PM »
Thanks.

But how must I use this script in order to disable 2FA for specific user?

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,385
Re: How to disable 2FA for dedicated user
« Reply #5 on: February 23, 2020, 02:48:30 AM »
Perhaps if you tell us the name of the plugin you are using then if there is someone else here who also uses that plugin they can give you some pointers. Otherwise maybe the plugin author can give you some more specific advice.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline cmonty14

  • Newbie
  • *
  • Posts: 4
Re: How to disable 2FA for dedicated user
« Reply #6 on: February 23, 2020, 03:18:36 AM »
Plugin name:
twofactor_gauthenticator https://plugins.roundcube.net/packages/alexandregz/twofactor_gauthenticator

Update:
Solved by deleting anything in field "preferences".
« Last Edit: February 23, 2020, 04:20:59 AM by cmonty14 »

Offline alec

  • Hero Member
  • *****
  • Posts: 1,178
Re: How to disable 2FA for dedicated user
« Reply #7 on: February 23, 2020, 03:26:17 AM »
Try bin/moduserprefs.sh --user=<user-id> --delete twofactor_gauthenticator