[gelöst] Login nicht möglich - Die Zwei-Faktor-Authentifizierung wird erzwungen,

Hallo Forum,

wie löse ich das Problem?

2fa

Die Zwei-Faktor-Authentifizierung wird erzwungen, wurde jedoch für Dein Konto nicht konfiguriert. Verwende einen Deiner Backup-Codes zum Anmelden,

Die Lösungen habe ich erfolglos ausprobiert.

var/www/nextcloud

sudo -u http php occ app:list
sudo: Unbekannter Benutzer: http
sudo: Regelwerks-Plugin konnte nicht initialisiert werden

Was muss ich anpassen?
Ist http = kay?

https://debianforum.de/forum/viewtopic.php?t=172367

sudo -u www-data php occ app:update --all

Es handelt sich im eine VPS c-rieger Installation mit nginx, basierend auf Debian 10 Buster.

Hängt das mit dieser Warnung zusammen?

HINWEIS:
Aufgrund eines Bugs in MariaDB 10.6.6 kommt es aktuell zu massiven Problemen mit dem Repository. Aus diesem Grund wurde vorübergehend das MariaDB – Paket 10.6 durch 10.5 ersetzt und die my.cnf entsprechend angepasst.

sudo -u www-data php occ twofactorauth:generate-code kay

                                                         
  Command "twofactorauth:generate-code" is not defined.  
                                                         
  Did you mean one of these?                             
      twofactorauth:cleanup                              
      twofactorauth:disable                              
      twofactorauth:enable                               
      twofactorauth:enforce                              
      twofactorauth:state

kay ist der Nextcloudadministrator.

sudo -u www-data php occ twofactorauth:state kay
Two-factor authentication is enabled for user kay

Enabled providers:
- backup_codes
- twofactor_webauthn
Disabled providers:
- totp
- u2f

Wie “Disabled providers” ich - backup_codes und - twofactor_webauthn?

sudo -u www-data php occ twofactorauth:disable kay

                                                  
  Not enough arguments (missing: "provider_id").  
                                                  

twofactorauth:disable [--output [OUTPUT]] [--] <uid> <provider_id>

Noch eine Lösung:

MfG
nc-kay

Das sollt die Lösung sein:

For disabling 2FA by OCC , I did below steps and everything is ok and back to Normal
I use Ubuntu 20.04 LTSC with Nextcloud 22.0

1- first we need to have SSH access logion to Sever

2- find nextcloud configuration file for instance (/var/www/nextcloud/config/config.php)

3- edit config.php and try to find line -
{ ‘twofactor_enforced’ => ‘true’, } change it to { ‘twofactor_enforced’ => ‘false’, }

4- remove below lines from config.php file as well
{ ‘twofactor_enforced_groups’ =>
array (
0 => ‘admin’,
),
‘twofactor_enforced_excluded_groups’ =>
array (
), }

5- save it

6 - it’s Done!

7- reboot the server every thing back to normal stage and 2FA is gone!!

letzter Abschnitt in der

/var/www/nextcloud/config/config.php

  'updater.release.channel' => 'stable',
  'twofactor_enforced' => 'false',
  'twofactor_enforced_groups' =>
  array (
  ),
  'twofactor_enforced_excluded_groups' =>
  array (
  ),
);



geändert in

  'updater.release.channel' => 'stable',
  'twofactor_enforced' => 'false',
);

Ein Reboot, das Problem ist leider immer noch da.

Meldung, Check

sudo -u www-data php occ twofactorauth:state kay
Two-factor authentication is enabled for user kay

Enabled providers:
- backup_codes
- twofactor_webauthn
Disabled providers:
- totp
- u2f

Was nun?

Die Anleitung habe ich ich wohl falsch umgesetzt.

Wie muss der entsprechende Teil richtig aussehen?

https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/config_sample_php_parameters.html

The installer creates a configuration containing the essential parameters. Only manually add configuration parameters to config/config.php if you need to use a special value for a parameter. Do not copy everything from config/config.sample.php . Only enter the parameters you wish to modify!

App Status:

sudo -u www-data php occ app:list
Enabled:
  - accessibility: 1.9.0
  - activity: 2.15.0
  - admin_audit: 1.13.0
  - circles: 23.0.1
  - cloud_federation_api: 1.6.0
  - comments: 1.13.0
  - contactsinteraction: 1.4.0
  - dashboard: 7.3.0
  - dav: 1.21.0
  - federatedfilesharing: 1.13.0
  - federation: 1.13.0
  - files: 1.18.0
  - files_external: 1.15.0
  - files_mindmap: 0.0.26
  - files_pdfviewer: 2.4.0
  - files_rightclick: 1.2.0
  - files_sharing: 1.15.0
  - files_trashbin: 1.13.0
  - files_versions: 1.16.0
  - files_videoplayer: 1.12.0
  - logreader: 2.8.0
  - lookup_server_connector: 1.11.0
  - nextcloud_announcements: 1.12.0
  - notifications: 2.11.1
  - oauth2: 1.11.0
  - password_policy: 1.13.0
  - photos: 1.5.0
  - privacy: 1.7.0
  - provisioning_api: 1.13.0
  - recommendations: 1.2.0
  - serverinfo: 1.13.0
  - settings: 1.5.0
  - sharebymail: 1.13.0
  - support: 1.6.0
  - systemtags: 1.13.0
  - text: 3.4.0
  - theming: 1.14.0
  - twofactor_backupcodes: 1.12.0
  - twofactor_totp: 6.2.0
  - twofactor_u2f: 6.3.0
  - updatenotification: 1.13.0
  - user_status: 1.3.1
  - viewer: 1.7.0
  - workflowengine: 2.5.0
Disabled:
  - encryption
  - firstrunwizard: 2.10.0
  - survey_client: 1.9.0
  - twofactor_webauthn: 0.2.15
  - user_ldap
  - weather_status: 1.2.0

Auszug:

  - twofactor_backupcodes: 1.12.0
  - twofactor_totp: 6.2.0
  - twofactor_u2f: 6.3.0

Mein Versuch:

sudo -u www-data php occ twofactorauth:disable kay

                                                  
  Not enough arguments (missing: "provider_id").  
                                                  

twofactorauth:disable [--output [OUTPUT]] [--] <uid> <provider_id>

Wie komme ich an die provider_id?
Wo finde ich diese?

Prüfen Release MariaDB

mysqlcheck -V
mysqlcheck  Ver 2.7.4-MariaDB Distrib 10.5.12-MariaDB, for debian-linux-gnu (x86_64)

Teilerfolg mit

sudo -u www-data php occ twofactorauth:disable kay backup_codes
Two-factor provider backup_codes disabled for user kay

jetzt gibt es im Internetbrowser ein:

Text:

 Zwei-Faktor Authentifizierung

Mindestens eine Deiner Zwei-Faktor-Authentifizierungsmethoden konnte nicht geladen werden. Kontaktiere Deinen Administrator.

Die Zwei-Faktor-Authentifizierung wird erzwungen, wurde jedoch für Dein Konto nicht konfiguriert. Bitte fahre mit der Einrichtung der Zwei-Faktor-Authentifizierung fort.

Will ich konfigurieren passiert nichts.

Status check:

sudo -u www-data php occ twofactorauth:state YourNextcloudAdmin
Two-factor authentication is enabled for user YourNextcloudAdmin

Enabled providers:
- twofactor_webauthn
Disabled providers:
- backup_codes
- totp
- u2f

Wie disable ich jetzt twofactor_webauthn ?

Versuch:

sudo -u www-data php occ twofactorauth:disable kay twofactor_webauthn

In ProviderManager.php line 52:
                                                     
  The provider 'twofactor_webauthn' does not exist'  
                                                     

twofactorauth:disable [--output [OUTPUT]] [--] <uid> <provider_id>

@wwe
Hallo wwe, hast Du eine Lösung für mich?

 sudo -u www-data php occ twofactorauth:disable kay twofactor_webauthn

In ProviderManager.php line 52:
                                                     
  The provider 'twofactor_webauthn' does not exist'  
                                                     

twofactorauth:disable [--output [OUTPUT]] [--] <uid> <provider_id>


Wo finde ich die ProviderManager.php ?

Kann mir jemand die Lösung übersetzen?
Ist das überhaupt meine Lösung?

Installierte NC Version: Nextcloud Hub II (23.0.1 RC3)

#########################
#########################

Edit: Ich habe neu installiert, ca. 2 Jahre funktionierte das System, schade.
Vermutlich habe ich es verbastelt, ein blödes Gefühl. :frowning:

Mit diesem Nextcloud 23 Installationsskript für Ubuntu 20.04 focal fossa

Nextcloud 23 auf Basis des Webservers nginx, des Datenbankservers MariaDB, PHP 8.x (php-fpm)

Die Dokumentation von c-rieger ist echt klasse.

Danke an c-rieger. :slight_smile:

Feststellung, evtl. war ich doch nicht allein zu doof.

Bei der neuen Installation mit cript von c-rieger:

sudo -u www-data php occ twofactorauth:state kay
This version of Nextcloud is not compatible with > PHP 8.0 You are currently running 8.1.2

Edit: 13. Feb. 2022
Das System ist etwas älter, basierte auf Debian 10 mit dem c-rieger Script installiert. Ich das System gelöscht und verwende jetzt Ubuntu 20.04 als Basis.
Fehler sind schwer, für mich sehr schwer zu finden.