sudo -u php occ twofactor:disable <provider_id>
What is the provider id and how do I obtain it?
I’m running Nextcloud in docker if that matters at all.
sudo -u php occ twofactor:disable <provider_id>
What is the provider id and how do I obtain it?
I’m running Nextcloud in docker if that matters at all.
You can run "occ twofactorauth:state <user>
" to get all enabled and disabled providers of a user displayed.
If you are dealing with LDAP users, you would have first to get the real user ID:
sudo -u www-data php occ ldap:search "test1"
test1 (348c2c8e-d81a-1037-88b0-bde66f992a00)
Then perform the occ command to get the provider_id for the specified user:
sudo -u www-data php occ twofactorauth:state 348c2c8e-d81a-1037-88b0-bde66f992a00
Two-factor authentication is enabled for user 348c2c8e-d81a-1037-88b0-bde66f992a00
Enabled providers:
- backup_codes
- totp
And eventually disable TOTP for this user:
sudo -u www-data php occ twofactor:disable 348c2c8e-d81a-1037-88b0-bde66f992a00 totp
Two-factor provider totp disabled for user 348c2c8e-d81a-1037-88b0-bde66f992a00.
Check new 2FA state for this user:
sudo -u www-data php occ twofactorauth:state 348c2c8e-d81a-1037-88b0-bde66f992a00
Two-factor authentication is enabled for user 348c2c8e-d81a-1037-88b0-bde66f992a00
Enabled providers:
- backup_codes
Disabled providers:
- totp
Thanks, this helped in fixing this issue.
This topic was automatically closed after 73 days. New replies are no longer allowed.