Ulaşım
- Adres:Ulubağ Mah. Recep Tayyip Erdoğan Bulvarı. No.287/A D.308 Haliliye / Şanlıurfa (Şanlıurfa Teknokent - TGB-1)
- Telefon:0 (545) 528 88 93
- eMail: info@alestasoft.com
# MailCow Admin Şifresi Sıfırlama / MailCow Admin Password Reset Rehberi
Şifre Sıfırlama
cd /opt/mailcow-dockerized/
./helper-scripts/mailcow-reset-admin.sh
y
## Sistemi Durdurma
İlk adımda container'ları durdurun:
docker compose stop
Container'lar durduğunda şu komutu çalıştırın:
docker compose run --rm --entrypoint '/bin/sh -c "gosu mysql mysqld --skip-grant-tables & sleep 10 && mysql -hlocalhost -uroot && exit 0"' mysql-mailcow
## Veritabanı İşlemleri
### 1. Veritabanı Adını Bulma
# kaynak mailcow.conf
# docker compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME}
MariaDB \[(none)\]> show databases; +--------------------+ | Database | +--------------------+ | information\_schema | | mailcow\_database | \<=== BURAYI NOT ALIN | mysql | | performance\_schema | +--------------------+ 4 satır (0.00 saniye)
### 2. Kullanıcı Şifrelerini Sıfırlama
#### Eski Sistemler (Maria DB < 10.4)
"password"
ve "authentication\_string"
alanlarının ikisi de mevcut. Şu anda "password"
kullanılıyor, ancak her ikisini de ayarlamak daha iyi olacaktır.
`MariaDB [(none)]> SELECT user FROM mysql.user;
+--------------+
| user |
+--------------+
| mailcow | <=== DEĞİŞTİRİLECEK KULLANICI
| root |
+--------------+
2 satır (0.00 saniye)
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> UPDATE mysql.user SET authentication_string = PASSWORD('yenisifre123'), password = PASSWORD('yenisifre123') WHERE User = 'root';
MariaDB [(none)]> UPDATE mysql.user SET authentication_string = PASSWORD('mailcowsifre'), password = PASSWORD('mailcowsifre') WHERE User = 'mailcow' AND Host = '%';
MariaDB [(none)]> FLUSH PRIVILEGES;`
#### Güncel Sistemler (Maria DB >= 10.4)
`MariaDB [(none)]> SELECT user FROM mysql.user;
+--------------+
| user |
+--------------+
| mailcow | <=== DEĞİŞTİRİLECEK KULLANICI
| root |
+--------------+
2 satır (0.00 saniye)
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> ALTER USER 'mailcow'@'%' IDENTIFIED BY 'mailcowsifre';
MariaDB [(none)]> ALTER USER 'root'@'%' IDENTIFIED BY 'yenisifre123';
MariaDB [(none)]> ALTER USER 'root'@'localhost' IDENTIFIED BY 'yenisifre123';
MariaDB [(none)]> FLUSH PRIVILEGES;`
## İki Faktörlü Kimlik Doğrulamayı Kaldırma
### Mailcow Web Arayüzü İçin:
MySQL şifresini sıfırlamaya benzer şekilde, ancak bu sefer MySQL CLI'ye bağlanmadan ana sunucudan yapıyoruz:
source mailcow.conf docker compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME} -e "DELETE FROM tfa WHERE username='KULLANICI\_ADINIZ';"
### SOGo İçin:
docker compose exec -u sogo sogo-mailcow sogo-tool user-preferences set defaults kullanici@ornek.com SOGoGoogleAuthenticatorEnabled '{"SOGoGoogleAuthenticatorEnabled":0}'