I enabled 2fa for the admin account, and now when I try to login I get an error:
Two-factor authentication is enforced but has not been configured on your account. Contact your admin for assistance
Through some searching I found the code: sudo -u www-data php /path/to/nextcloud/occ twofactorauth:disable username
which throws the error:
Not enough arguments (missing: “provider_id”).
Which is where I am stuck. I have tried various things for “provider_id” (including the username of the user, the hosting site name, www-data, www, and more I can’t remember), they all don’t exist.
Is there a way to either remove 2fa without knowing the provider ID, or otherwise is there a way to find the provider ID?
I was able to get into account by manually editing config.php and changing ‘twofactor_enforced’ => ‘true’, to ‘twofactor_enforced’ => ‘false’
my file was located in /var/www/nextcloud/config/config.php
start by backing up config.php by making a copy just in case
-sudo cp /var/www/nextcloud/config/config.php /var/www/nextcloud/config/config.php.bkp
-sudo nano /var/www/nextlcloud/config/config.php
-change ‘twofactor_enforced’ => ‘true’, to ‘twofactor_enforced’ => ‘false’
-CTRL+x and y for yes to save changes and restart server
I did the same commands. But i have this message
I’m using Yunohost.
Looks like you’re trying to reinstall your Nextcloud. However, the CAN_INSTALL file is missing from your configuration directory. Please create the CAN_INSTALL file in your configuration folder to continue