ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Mitigating Nextcloud Two Factor Authentication Error

    IT Discussion
    nextcloud 15 centos 7 nextcloud
    2
    2
    455
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • wirestyle22W
      wirestyle22
      last edited by wirestyle22

      I upgraded Nextcloud and for some reason two-factor authentication activated on my admin account. Since I couldn't access my admin account I needed to find a way via cli to disable two factor authentication, but because it wasn't configured there was no folder in /var/www/html/nextcloud/apps for me to rename, etc. Below is the command I found that worked for me.

      sudo -u apache php occ config:system:set twofactor_enforced --value=false

      Note: You have to run the command as apache, or if you're using Debian www-data.

      JaredBuschJ 1 Reply Last reply Reply Quote 4
      • JaredBuschJ
        JaredBusch @wirestyle22
        last edited by

        @wirestyle22 said in Mitigating Nextcloud Two Factor Authentication Error:

        I upgraded Nextcloud and for some reason two-factor authentication activated on my admin account. Since I couldn't access my admin account I needed to find a way via cli to disable two factor authentication, but because it wasn't configured there was no folder in /var/www/html/nextcloud/apps for me to rename, etc. Below is the command I found that worked for me.

        sudo -u apache php occ config:system:set twofactor_enforced --value=false

        Note: You have to run the command as apache, or if you're using Debian www-data.

        You also need to be in the right folder

        By default on Fedora

        cd /var/www/html/nextcloud
        

        Or

        sudo -u apache php /var/www/html/nextcloud/occ config:system:set twofactor_enforced --value=false
        
        1 Reply Last reply Reply Quote 3
        • 1 / 1
        • First post
          Last post