Big problem with Two Factor authentication for Nextcloud and Webtop 5

Hello friends,

after a crash I had to reset my iPhone and also had to re-play the Google Authenticator, which I used for the two-factor authentication. Now it is no longer possible to access Webtop or Nextcloud. How can I disable the two factor authentication via putty?

Thanks you for your help.


If there is no other admin user that can authenticate, on Nextcloud you can disable 2FA using occ command. To temporarily disable 2FA for a specific user:

su - apache -s /bin/bash -c "source /opt/rh/rh-php71/enable; cd /usr/share/nextcloud/; php occ twofactor:disable <username>"

Another option for nextcloud would be to disable the 2FA app…

For webtop5:

su - postgres -c 'psql webtop5'
UPDATE "core"."settings" SET "value"='false' WHERE "key"='otp.enabled';

Afterwards you may have to trigger:

signal-event nethserver-webtop5-update

Thank You so much… this saved my day too!


I have to ask one more question… how would i go about enabling the 2 factor authentication again…
since when i enable it again it does not seem to reset to default settings. So i can’t login again
Maybe I am missing something.
Any help is greatly appreciated!

For Nextcloud or Webtop?


A small correction, the above commands disable OTP globally and gray-out OTP user’s settings, if I’m not mistaken. Same as admin can do from WebTop system properties.

As admin, from Domains > NethServer > Users you can right-click on a user and select Settings from context menu, then access user’s OTP settings and deactivate it for that user.

To disable OTP for a specific user (or the admin), from the command line:

su - postgres -c 'psql webtop5'
UPDATE "core"."user_settings" SET "value"='false' WHERE "key"='otp.enabled' AND "user_id"='theusergoeshere';

No signal-event required.
Later on, either the user or the admin can reconfigure OTP settings.


Sorry it took me so long to test this solution,
worked like a charm! Thank You!!

Thanks for reporting. Another :medal_sports: for @dnutan :slight_smile:

1 Like