How to disable 2FA aka 2 Factor Authentification — CyberPanel - WebHosting Control Panel for OpenLiteSpeed
CyberLoader

How to disable 2FA aka 2 Factor Authentification

Original thanks to @land12 for method in: https://forums.cyberpanel.net/discussion/comment/11902/#Comment_11902

Below is reusable way to do this for the main administrator with an id of 1

How to disable it
PASSWORD=$(cat /etc/cyberpanel/mysqlPassword);
DB_NAME="cyberpanel";
mysql -uroot -p${PASSWORD} "${DB_NAME}" -e "UPDATE loginSystem_administrator SET twoFA = '0' WHERE id = 1;"

How to check if its enabled:
PASSWORD=$(cat /etc/cyberpanel/mysqlPassword);
DB_NAME="cyberpanel";
mysql -uroot -p${PASSWORD} "${DB_NAME}" -e "SELECT twoFA FROM loginSystem_administrator WHERE id = 1;"

Example:
[email protected]:~# PASSWORD=$(cat /etc/cyberpanel/mysqlPassword);
[email protected]:~# DB_NAME="cyberpanel";
[email protected]:~# mysql -uroot -p${PASSWORD} "${DB_NAME}" -e "SELECT twoFA FROM loginSystem_administrator WHERE id = 1;"
+-------+
| twoFA |
+-------+
| 0 |
+-------+
[email protected]:~#

Also requested that the official documentation is updated to reflect how to do this as it seems to be coming up alot lately.
https://cyberpanel.net/docs/two-factor-authentication-in-cyberpanel/
Tagged:
Tagged:

Comments

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!