Roundcube Community Forum

News and Announcements => General Discussion => Topic started by: cmonty14 on February 21, 2020, 04:08:29 AM

Title: How to disable 2FA for dedicated user
Post by: cmonty14 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
Title: Re: How to disable 2FA for dedicated user
Post by: JohnDoh on February 22, 2020, 03:21:44 AM
Please contact the author of the 2FA plugin you are using or your email provider.
Title: Re: How to disable 2FA for dedicated user
Post by: cmonty14 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
Title: Re: How to disable 2FA for dedicated user
Post by: JohnDoh 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.
Title: Re: How to disable 2FA for dedicated user
Post by: cmonty14 on February 22, 2020, 01:40:06 PM
Thanks.

But how must I use this script in order to disable 2FA for specific user?
Title: Re: How to disable 2FA for dedicated user
Post by: JohnDoh 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.
Title: Re: How to disable 2FA for dedicated user
Post by: cmonty14 on February 23, 2020, 03:18:36 AM
Plugin name:
twofactor_gauthenticator https://plugins.roundcube.net/packages/alexandregz/twofactor_gauthenticator (https://plugins.roundcube.net/packages/alexandregz/twofactor_gauthenticator)

Update:
Solved by deleting anything in field "preferences".
Title: Re: How to disable 2FA for dedicated user
Post by: alec on February 23, 2020, 03:26:17 AM
Try bin/moduserprefs.sh --user=<user-id> --delete twofactor_gauthenticator