From 5cc5190f6b4b5e04de8e32f0e7b99cb71b81d854 Mon Sep 17 00:00:00 2001 From: timo Date: Sat, 6 May 2017 22:32:10 +0200 Subject: [PATCH] Added missing TFA section --- docs/reset_pw.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/docs/reset_pw.md b/docs/reset_pw.md index 0e1cfe705..e4b2b6513 100644 --- a/docs/reset_pw.md +++ b/docs/reset_pw.md @@ -7,12 +7,6 @@ cd mailcow_path bash mailcow-reset-admin.sh ``` -## Remove Two-Factor Authentication - -``` - -``` - ## Reset MySQL Passwords Stop the stack by running `docker-compose stop`. @@ -26,6 +20,8 @@ docker-compose run --rm --entrypoint '/bin/sh -c "gosu mysql mysqld --skip-grant ### 1\. Find database name ``` +# source mailcow.conf +# docker-compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME} MariaDB [(none)]> show databases; +--------------------+ | Database | @@ -57,3 +53,12 @@ MariaDB [(none)]> UPDATE mysql.user SET authentication_string = PASSWORD('gotr00 MariaDB [(none)]> UPDATE mysql.user SET authentication_string = PASSWORD('mookuh'), password = PASSWORD('mookuh') WHERE User = 'mailcow' AND Host = '%'; MariaDB [(none)]> FLUSH PRIVILEGES; ``` + +## Remove Two-Factor Authentication + +This works similar to resetting a MySQL password, now we do it from the host without connecting to the MySQL cli: + +``` +source mailcow.conf +docker-compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME} -e DELETE FROM tfa WHERE username='YOUR_USERNAME' +```