2fa_nextcloud_adjustments
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| 2fa_nextcloud_adjustments [2021/07/13 17:45] – created chris | 2fa_nextcloud_adjustments [2021/07/13 18:45] (current) – chris | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ** DISABLE 2FA IN NEXTCLOUD ** | ** DISABLE 2FA IN NEXTCLOUD ** | ||
| + | |||
| + | If you cannot login or lost your back-up codes for TOTP in Nextcloud, you can disable it by editing the SQL database. | ||
| + | |||
| + | Follow these steps: | ||
| + | |||
| + | mysql -u root -p | ||
| + | |||
| + | Enter your passsword and list the database you have nextcloud installed in with | ||
| + | |||
| + | show databases; | ||
| + | |||
| + | Go into your database name (in this case nextclouddb) by typing: | ||
| + | |||
| + | use nextclouddb; | ||
| + | |||
| + | Find the table with passwords for TOTP with: | ||
| + | |||
| + | | ||
| + | |||
| + | It will show a the table like this: | ||
| + | |||
| + | | ||
| + | | provider_id | ||
| + | +----------------------------------+-------------+---------+ | ||
| + | | backup_codes | ||
| + | | backup_codes | ||
| + | | ... | ... | ||
| + | | totp | user1 | ||
| + | | totp | user2 | ||
| + | | ... | ... | ||
| + | | twofactor_nextcloud_notification | user1 | ||
| + | | twofactor_nextcloud_notification | user2 | ||
| + | | ... | ... | ||
| + | | u2f | user1 | ||
| + | | u2f | user2 | ||
| + | | ... | ... | ||
| + | +----------------------------------+-------------+---------+ | ||
| + | |||
| + | |||
| + | Change the value in " | ||
| + | |||
| + | | ||
| + | |||
| + | After this change your good to login without 2FA for that selected user. If you like to enable 2FA again for a particular user just enable the value with ' | ||
| + | |||
| + | | ||
| + | |||
| + | |||
| + | Tip: | ||
| + | |||
| + | you also can change the secrets are make it a identical code for all users in this table: | ||
| + | |||
| + | +----+---------+----------------------------------------+-------+--------------+ | ||
| + | | id | user_id | secret | ||
| + | +----+---------+----------------------------------------+-------+--------------+ | ||
| + | | 1 | user1 | WQSXCDEOTKGVMB | ||
| + | | 2 | user2 | POIJELKAJSDIFJ | ||
| + | | 3 | user3 | LKAJDFOIJEJLKL | ||
| + | | 4 | user4 | ALSKDJFIKOEJLF | ||
| + | | 5 | user5 | KJALKENEODKJLK | ||
| + | +----+---------+----------------------------------------+-------+--------------+ | ||
| + | |||
| + | List the table by typing | ||
| + | |||
| + | select * from oc_twofactor)totp_secrets; | ||
| + | |||
| + | Update the users with a particular code of another user by typing: | ||
| + | |||
| + | insert into oc_twofactor_totp_secrets (id, user_id, secret, stat, last_counter (values(2,' | ||
| + | |||
| + | \\ | ||
| + | \\ | ||
| + | Enjoy, | ||
| + | |||
| + | **Your ArtIT Team** | ||
| + | \\ | ||
| + | \\ | ||
| + | |||
| + | **[[applications|BACK]]** | ||
| + | |||
| + | |||
2fa_nextcloud_adjustments.1626191139.txt.gz · Last modified: 2021/07/13 17:45 by chris
