diff options
author | Christian Rößler | 2019-10-29 16:12:53 +0100 |
---|---|---|
committer | Christian Rößler | 2019-10-29 16:12:53 +0100 |
commit | 0bc09d64f069a5e421ab3a7032aea3cc07d14a10 (patch) | |
tree | 174593abda914e05d7802091a5b6e23c31e5ca81 | |
parent | [SSPS] mysql has no root passwd anymore, pump not avaliable anymore (diff) | |
download | setup-scripts-0bc09d64f069a5e421ab3a7032aea3cc07d14a10.tar.gz setup-scripts-0bc09d64f069a5e421ab3a7032aea3cc07d14a10.tar.xz setup-scripts-0bc09d64f069a5e421ab3a7032aea3cc07d14a10.zip |
[SSPS] static files/rclocal_script.sh bug (passwds written but not changed)
-rw-r--r-- | satellit_installer/static_files/rclocal_script.sh | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/satellit_installer/static_files/rclocal_script.sh b/satellit_installer/static_files/rclocal_script.sh index 2fc4235..303b053 100644 --- a/satellit_installer/static_files/rclocal_script.sh +++ b/satellit_installer/static_files/rclocal_script.sh @@ -57,21 +57,10 @@ echo "Generiere intern genutzte Passwörter (z.B. MySQL-Zugänge) neu ..." >> /r umask 0077 MYSQL_SAT_NEW=$(generate_password) -echo "SET PASSWORD FOR 'sat'@'localhost' = PASSWORD('$MYSQL_SAT_NEW');" | mysql -u root -p"${MYSQL_ROOT_NEW}" || perror "Neusetzen des sat-MySQL-Passworts fehlgeschlagen." +echo "SET PASSWORD FOR 'sat'@'localhost' = PASSWORD('$MYSQL_SAT_NEW');" | mysql -u root || perror "Neusetzen des sat-MySQL-Passworts fehlgeschlagen." MYSQL_OPENSLX_NEW=$(generate_password) -echo "SET PASSWORD FOR 'openslx'@'localhost' = PASSWORD('$MYSQL_OPENSLX_NEW');" | mysql -u root -p"${MYSQL_ROOT_NEW}" || perror "Neusetzen des openslx-MySQL-Passworts fehlgeschlagen." - -# Debian 9 (stretch) does not seem to have a debian-sys-maint user anymore. -MYSQL_SYSMAINT_NEW=$(generate_password) -if grep -q debian-sys-maint /etc/mysql/debian.cnf; then - echo "SET PASSWORD FOR 'debian-sys-maint'@'localhost' = PASSWORD('$MYSQL_SYSMAINT_NEW');" | mysql -u root -p"${MYSQL_ROOT_NEW}" || perror "Neusetzen des debian-sys-maint-Passworts fehlgeschlagen." - # Patching debian-sys-maint password into /etc/mysql/debian.cnf: - patchfiles 'password *=.*$' "password = $MYSQL_SYSMAINT_NEW" "/etc/mysql/debian.cnf" -fi - -# Store mysql root pass in root's home -chmod 600 /root/mysqlpass +echo "SET PASSWORD FOR 'openslx'@'localhost' = PASSWORD('$MYSQL_OPENSLX_NEW');" | mysql -u root || perror "Neusetzen des openslx-MySQL-Passworts fehlgeschlagen." echo -n "Konfigurationsdateien werden aktualisiert..." >> /root/init.log |