also change the database user passwords

This commit is contained in:
Christoph Haas 2025-11-02 18:45:06 +01:00
parent 99deac4a70
commit 4c643859ec

View file

@ -29,6 +29,13 @@ sed -i "s|MAILSERVER-PASSWORD-HERE|$PW_MAILSERVER|g" \
# Restart the services
systemctl restart postfix dovecot
# Update MariaDB user passwords
mariadb <<EOF
ALTER USER 'mailadmin'@'localhost' IDENTIFIED BY '${PW_MAILADMIN}';
ALTER USER 'mailserver'@'127.0.0.1' IDENTIFIED BY '${PW_MAILSERVER}';
FLUSH PRIVILEGES;
EOF
# Print the passwords for us to write down
echo "mailadmin password: $PW_MAILADMIN"
echo "mailserver password: $PW_MAILSERVER"