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?
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';
\q
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!
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';
\q
No signal-event required.
Later on, either the user or the admin can reconfigure OTP settings.