2FA error — CyberPanel - WebHosting Control Panel for OpenLiteSpeed

2FA error

edited September 2020 in Bug Report
Provider: UpCloud

Virtualization Type: KVM

System: Centos 7

Installation option: since during the installation.
there will be few option to choose,so please provide it as well.

OLS or Enterprise?

Installing from official server or mirror server?

Install Memcached extension for PHP?

Install LiteSpeed Memcached?

Install Memcached?

Install Redis extension for PHP?

Install Redis?


I've added 2FA via google authenticator for admin user, however it doesn't work and now I am locked out from my CP Admin.

Please advise on how to disable it from console.


  • edited September 2020
    Same here.

    The code is correct, the password is correct.

    I got Could Not Login, Error message: 'twofa'

    How do we disable 2FA now?
  • HOW to Disable 2FA Via Command ?
  • edited February 7
    Do have Anyone any sollution..? > @land12 said:
    > HOW to Disable 2FA Via Command ?
  • for Ubuntu 20.04.1 LTS - CyberPanel v2.03
    Please try go to SSH , run following commands

    MYSQL_PWD=`cat /etc/cyberpanel/mysqlPassword` mysql -uroot
    to enter mysql command line

    use cyberpanel;
    to enter cyberpanel database,

    UPDATE `loginSystem_administrator` SET `twoFA` = '0' WHERE `loginSystem_administrator`.`id` = 1;
    force off 2FA for admin account.

    total output should be like below:

    [[email protected] ~]# MYSQL_PWD=`cat /etc/cyberpanel/mysqlPassword` mysql -uroot
    Welcome to the MariaDB monitor. Commands end with ; or \g.
    Your MariaDB connection id is 4526
    Server version: 10.5.7-MariaDB MariaDB Server

    Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

    MariaDB [(none)]> use cyberpanel;
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A

    Database changed
    MariaDB [cyberpanel]> UPDATE `loginSystem_administrator` SET `twoFA` = '0' WHERE `loginSystem_administrator`.`id` = 1;
    Query OK, 0 rows affected (0.001 sec)
    Rows matched: 1 Changed: 0 Warnings: 0

    MariaDB [cyberpanel]>
    after that , clean up browser cache and check again.
  • https://forums.cyberpanel.net/discussion/5148/how-to-disable-2fa-aka-2-factor-authentification
Sign In or Register to comment.
CyberPanel Discord

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!