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/
Comments
+-------+
| twoFA |
+-------+
| 0 |
+-------+
I still can’t access our panel