Clean root password Management
Don't store the root password. Provide easy replacement for mysql_pwd.py
This commit is contained in:
23
preservices/25-bdd-init
Normal file
23
preservices/25-bdd-init
Normal file
@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Initialize root password
|
||||
# and secure MariaDB installation
|
||||
#
|
||||
|
||||
ROLE=$(CreoleGet dbClusterPosition)
|
||||
SECURE_CMD="mysql_secure_installation"
|
||||
PASSWORD=$(pwgen -1 10)
|
||||
passwd="/usr/share/eole/scripts/mariadbPwd"
|
||||
|
||||
${passwd} ${PASSWORD}
|
||||
|
||||
# Run secure installation script
|
||||
${SECURE_CMD} <<__EOF__
|
||||
${oldPass}
|
||||
y
|
||||
n
|
||||
y
|
||||
y
|
||||
y
|
||||
y
|
||||
__EOF__
|
Reference in New Issue
Block a user