We have Nextcloud, part of lxc containers. It has been a while since we used backup codes and now we have gotten logged/locked out after we activated the two-way authentication. Could someone suggest a way to reset the settings? Note: this is part of a subdomain and placed under the lamp server container. Thanks in advance to the community for getting into this discussion.
@jesse: Should I then re-post it? As this pertained to container and server management, which forms the fulcrum and focus of back-end developers, I thought that this might fit here.
There are only forums for ISPConfig and general Linux admin/programming type stuff, so probably there isn't a good one for how to regain access to nextcloud, but Server Operation might be the most generic? A quick google search finds https://help.nextcloud.com/ and other sites that would be more relevant, but you could try there.
Ok and Thanks. I also submitted this question over at Nextcloud. As this pertained to container, lamp and ISPConfig, I decided to share over here as well.
I have encountered issues with 2FA and Nextcloud before. A quick search got me this: https://help.nextcloud.com/t/disable-2-factor-authentication/59151/3 https://docs.nextcloud.com/server/l...server/occ_command.html#two-factor-auth-label https://help.nextcloud.com/t/administrator-account-locked-out-due-to-2fa-enforcement/43306
Thanks. Yes, I restarted the container and server. I even tried this command from the command line prior to starting this thread. Command tried: sudo -u www-data php /var/www/nextcloud/occ app:enable twofactor_totp On the positive end, I was able to locate the folder named backupcodes under Nextcloud. However, I could not still figure out a way to reset the backup codes within the container server. I again tried a version of the above command right within the nextcloud folder without much luck. Any additional suggestions would be appreciated.
@Th0m: Thanks again. I did not share the complete list of commands tried. Here is the latest one tried, along with the error. sudo -u www-data php occ twofactor:disable admin error: failed to open stream: Permission denied on 11 in occ file
One more tried right where the OCC file and data folder is - sudo -u data php occ twofactor:disable admin sudo: unknown user: data sudo: unable to initialize policy plugin
Here is the path where nextcloud is located within the container lamp-1-dns-1. /var/lib/lxd/containers/lamp-1-dns-1/rootfs/var/www/clients/client2/web11/web this is where the occ file is. Folders and files under this directory: 3rdparty config core index.html occ ocs-provider resources status.php version.php apps console.php cron.php index.php ocm-provider public.php robots.txt themes AUTHORS COPYING data lib ocs remote.php stats updater
Run this command: Code: sudo -u web11 php /var/www/clients/client2/web11/webocc app:disable twofactor_totp
I tried this command right from the above-mentioned path and also from the parent folder to web (web11). which should not matter with the complete path mentioned in your command and got the following error for both the cases: sudo: unknown user: web11 sudo: unable to initialize policy plugin Please note that I am resetting the password for the admin. I also tried admin instead of web11, which also resulted in the same error. Quick note: /web11/web/data has a list of all users incl. admin.
Got it, I think. I am into the container and ran the command within the container, which is what you meant in your reply, I guess, sudo -u web11 php /var/www/clients/client2/web11/web/occ app:disable twofactor_totp No such app enabled: twofactor_totp