Commit 0d63140f authored by w4t's avatar w4t

wtserver 0.85

parent 065cd830
......@@ -31,7 +31,7 @@ AskQuestions() {
CFG_MYSQL_ROOT_PWD=$(whiptail --title "$CFG_SQLSERVER" --backtitle "$WT_BACKTITLE" --inputbox "Please specify a $CFG_SQLSERVER Root Password (leave empty for autogenerate)" --nocancel $WT_HEIGHT $WT_WIDTH 3>&1 1>&2 2>&3)
if [[ -z $CFG_MYSQL_ROOT_PWD ]]; then
CFG_MYSQL_ROOT_PWD=$(tr </dev/urandom -dc 'A-Z-a-z-0-9' | head -c${1:-29})
CFG_MYSQL_ROOT_PWD=$(tr </dev/urandom -dc 'A-Za-z0-9' | head -c${1:-29})
fi
while [[ ! "$CFG_WEBSERVER" =~ $RE ]]; do
......@@ -78,7 +78,7 @@ AskQuestions() {
CFG_ROUNDCUBE_PWD=$(whiptail --title "Roundcube Database Password" --backtitle "$WT_BACKTITLE" --inputbox "Please specify a Roundcube Database Password (leave empty for autogenerate)" --nocancel $WT_HEIGHT $WT_WIDTH 3>&1 1>&2 2>&3)
if [[ -z $CFG_ROUNDCUBE_PWD ]]; then
CFG_ROUNDCUBE_PWD=$(tr </dev/urandom -dc 'A-Z-a-z-0-9' | head -c${1:-29})
CFG_ROUNDCUBE_PWD=$(tr </dev/urandom -dc 'A-Za-z0-9' | head -c${1:-29})
fi
while [[ ! "$CFG_ROUNDCUBE_SOAP_USR" =~ $RE ]]; do
......@@ -89,7 +89,7 @@ AskQuestions() {
CFG_ROUNDCUBE_SOAP_PWD=$(whiptail --title "Roundcube Ispconfig3 Soap Password" --backtitle "$WT_BACKTITLE" --inputbox "Please specify a Roundcube Ispconfig3 Soap Password (leave empty for autogenerate)" --nocancel $WT_HEIGHT $WT_WIDTH 3>&1 1>&2 2>&3)
if [[ -z $CFG_ROUNDCUBE_SOAP_PWD ]]; then
CFG_ROUNDCUBE_SOAP_PWD=$(tr </dev/urandom -dc 'A-Z-a-z-0-9' | head -c${1:-29})
CFG_ROUNDCUBE_SOAP_PWD=$(tr </dev/urandom -dc 'A-Za-z0-9' | head -c${1:-29})
fi
fi
fi
......@@ -107,7 +107,7 @@ AskQuestions() {
MMSITEPASS=$(whiptail --title "Mailman Site Password" --backtitle "$WT_BACKTITLE" --inputbox "Please specify a Mailman Site Password (leave empty for autogenerate)" --nocancel $WT_HEIGHT $WT_WIDTH 3>&1 1>&2 2>&3)
if [[ -z $MMSITEPASS ]]; then
MMSITEPASS=$(tr </dev/urandom -dc 'A-Z-a-z-0-9' | head -c${1:-29})
MMSITEPASS=$(tr </dev/urandom -dc 'A-Za-z0-9' | head -c${1:-29})
fi
while [[ ! "$MMLISTOWNER" =~ $RE ]]; do
......@@ -122,7 +122,7 @@ AskQuestions() {
MMLISTPASS=$(whiptail --title "Mailman Site List Password" --backtitle "$WT_BACKTITLE" --inputbox "Please specify a Mailman Site List Password (leave empty for autogenerate)" --nocancel $WT_HEIGHT $WT_WIDTH 3>&1 1>&2 2>&3)
if [[ -z $MMLISTPASS ]]; then
MMLISTPASS=$(tr </dev/urandom -dc 'A-Z-a-z-0-9' | head -c${1:-29})
MMLISTPASS=$(tr </dev/urandom -dc 'A-Za-z0-9' | head -c${1:-29})
fi
else
CFG_MAILMAN=no
......@@ -264,7 +264,7 @@ AskQuestions() {
CFG_GITLAB_ADMIN_PWD=$(whiptail --title "Gitlab" --backtitle "$WT_BACKTITLE" --inputbox "Please specify a Gitlab Admin Password (leave empty for autogenerate)" --nocancel $WT_HEIGHT $WT_WIDTH 3>&1 1>&2 2>&3)
if [[ -z $CFG_GITLAB_ADMIN_PWD ]]; then
CFG_GITLAB_ADMIN_PWD=$(tr </dev/urandom -dc 'A-Z-a-z-0-9' | head -c${1:-29})
CFG_GITLAB_ADMIN_PWD=$(tr </dev/urandom -dc 'A-Za-z0-9' | head -c${1:-29})
fi
fi
......@@ -335,7 +335,7 @@ AskQuestions() {
CFG_ISPONCFIG_ADMIN_PASS=$(whiptail --title "ISPConfig" --backtitle "$WT_BACKTITLE" --inputbox "Please specify an ISPConfig Admin Password (leave empty for autogenerate)" --nocancel $WT_HEIGHT $WT_WIDTH 3>&1 1>&2 2>&3)
if [[ -z $CFG_ISPONCFIG_ADMIN_PASS ]]; then
CFG_ISPONCFIG_ADMIN_PASS=$(tr </dev/urandom -dc 'A-Z-a-z-0-9' | head -c${1:-29})
CFG_ISPONCFIG_ADMIN_PASS=$(tr </dev/urandom -dc 'A-Za-z0-9' | head -c${1:-29})
fi
echo -e " [${green}DONE${NC}]"
......
......@@ -162,8 +162,7 @@ default-authentication-plugin=mysql_native_password
echo -e "[${green}DONE${NC}]"
#mariadb -uroot -e "ALTER USER 'root'@'localhost' IDENTIFIED VIA mysql_native_password USING PASSWORD('$CFG_MYSQL_ROOT_PWD'); FLUSH PRIVILEGES;"
mariadb -uroot -p"$CFG_MYSQL_ROOT_PWD" -e "ALTER USER 'root'@'localhost' IDENTIFIED VIA mysql_native_password USING PASSWORD('$CFG_MYSQL_ROOT_PWD'); FLUSH PRIVILEGES;"
systemctl restart mariadb
#mariadb -uroot -p"$CFG_MYSQL_ROOT_PWD" -e "ALTER USER 'root'@'localhost' IDENTIFIED VIA mysql_native_password USING PASSWORD('$CFG_MYSQL_ROOT_PWD'); FLUSH PRIVILEGES;"
#echo -n -e "$IDENTATION_LVL_1 Set password authentication for the root user... "
#echo "ALTER USER 'root'@'localhost' IDENTIFIED BY '$CFG_MYSQL_ROOT_PWD';" > $PROGRAMS_INSTALL_SQLS/mariadbroot.sql
#echo "FLUSH PRIVILEGES;" >> $PROGRAMS_INSTALL_SQLS/mariadbroot.sql
......@@ -196,9 +195,15 @@ default-authentication-plugin=mysql_native_password
set timeout 10
spawn mysql_secure_installation
expect \"Enter current password for root (enter for none):\"
send \"$CFG_MYSQL_ROOT_PWD\r\"
expect \"Change the root password?\"
send \"\r\"
expect \"Switch to unix_socket authentication:\"
send \"n\r\"
expect \"Change the root password?\"
send \"y\r\"
expect \"New password:\"
send \"$env(CFG_MYSQL_ROOT_PWD)\r\"
expect \"Re-enter new password:\"
send \"$env(CFG_MYSQL_ROOT_PWD)\r\"
expect \"Remove anonymous users?\"
send \"y\r\"
expect \"Disallow root login remotely?\"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment