Update debug-reset_pw.md

Dieser Commit ist enthalten in:
André Peters 2020-10-02 14:17:54 +02:00 committet von GitHub
Ursprung ec9efaa6a7
Commit 0067840f67
Es konnte kein GPG-SchlĂĽssel zu dieser Signatur gefunden werden
GPG-SchlĂĽssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -36,6 +36,8 @@ MariaDB [(none)]> show databases;
### 2\. Reset one or more users
#### 2\.1 Maria DB < 10.4 (older mailcow installations)
Both "password" and "authentication_string" exist. Currently "password" is used, but better set both.
```
@ -43,7 +45,7 @@ MariaDB [(none)]> SELECT user FROM mysql.user;
+--------------+
| user |
+--------------+
| mailcow_user | <=====
| mailcow | <=====
| root |
+--------------+
2 rows in set (0.00 sec)
@ -54,6 +56,25 @@ MariaDB [(none)]> UPDATE mysql.user SET authentication_string = PASSWORD('mookuh
MariaDB [(none)]> FLUSH PRIVILEGES;
```
#### 2\.2 Maria DB >= 10.4 (current mailcows)
```
MariaDB [(none)]> SELECT user FROM mysql.user;
+--------------+
| user |
+--------------+
| mailcow | <=====
| root |
+--------------+
2 rows in set (0.00 sec)
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> ALTER USER 'mailcow'@'%' IDENTIFIED BY 'FB6RsEqbfxjc10MqVt5hGpf3zk0F';
MariaDB [(none)]> ALTER USER 'root'@'%' IDENTIFIED BY 'kRFU4SG9ZTWAS7vMd3Nh4uTkk7Ns';
MariaDB [(none)]> ALTER USER 'root'@'localhost' IDENTIFIED BY 'kRFU4SG9ZTWAS7vMd3Nh4uTkk7Ns';
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: