Activated 2FA without installing / configuring app - hot to disable again?

Support intro

Or for longer, use three backticks above and below the code snippet:


Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version 21.0.0
Operating system and version: dont know (shared hosting)
Apache or nginx version: dont know (shared hosting) replace me
PHP version: 7.4-latest FPM

I activated 2FA for admin group - but did not know, that I have to install / configure an 2FA-app for this. So now at login as admin i get a message saying that 2FA is enforced, but not configured for my account. Login as a “normal” user is still possible.

How can I disable 2FA without beeing able to login?

I already tried

php occ twofactorauth:state MyUserName

and got this:

Two-factor authentication is not enabled for user MyUserName
Disabled providers:
- backup_codes

I also have access to the database.

Can anybody help?

Best regards!


I just reproduced this problem on a testserver and solved at as follows:

ad your config.php:
Search for a section called something like Groups 2Fa enforced set it to false and restart your webserver.

1 Like

Hey, drjambus, that’s really great !

'twofactor_enforced' => 'false',

solved my problem. I now can login again!

Thank you so much!