Commit 0d63140f authored by w4t's avatar w4t

wtserver 0.85

parent 065cd830
...@@ -31,7 +31,7 @@ AskQuestions() { ...@@ -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) 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 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 fi
while [[ ! "$CFG_WEBSERVER" =~ $RE ]]; do while [[ ! "$CFG_WEBSERVER" =~ $RE ]]; do
...@@ -78,7 +78,7 @@ AskQuestions() { ...@@ -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) 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 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 fi
while [[ ! "$CFG_ROUNDCUBE_SOAP_USR" =~ $RE ]]; do while [[ ! "$CFG_ROUNDCUBE_SOAP_USR" =~ $RE ]]; do
...@@ -89,7 +89,7 @@ AskQuestions() { ...@@ -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) 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 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 fi
fi fi
...@@ -107,7 +107,7 @@ AskQuestions() { ...@@ -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) 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 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 fi
while [[ ! "$MMLISTOWNER" =~ $RE ]]; do while [[ ! "$MMLISTOWNER" =~ $RE ]]; do
...@@ -122,7 +122,7 @@ AskQuestions() { ...@@ -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) 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 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 fi
else else
CFG_MAILMAN=no CFG_MAILMAN=no
...@@ -264,7 +264,7 @@ AskQuestions() { ...@@ -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) 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 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
fi fi
...@@ -335,7 +335,7 @@ AskQuestions() { ...@@ -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) 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 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 fi
echo -e " [${green}DONE${NC}]" echo -e " [${green}DONE${NC}]"
......
...@@ -162,8 +162,7 @@ default-authentication-plugin=mysql_native_password ...@@ -162,8 +162,7 @@ default-authentication-plugin=mysql_native_password
echo -e "[${green}DONE${NC}]" 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 -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;" #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
#echo -n -e "$IDENTATION_LVL_1 Set password authentication for the root user... " #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 "ALTER USER 'root'@'localhost' IDENTIFIED BY '$CFG_MYSQL_ROOT_PWD';" > $PROGRAMS_INSTALL_SQLS/mariadbroot.sql
#echo "FLUSH PRIVILEGES;" >> $PROGRAMS_INSTALL_SQLS/mariadbroot.sql #echo "FLUSH PRIVILEGES;" >> $PROGRAMS_INSTALL_SQLS/mariadbroot.sql
...@@ -196,9 +195,15 @@ default-authentication-plugin=mysql_native_password ...@@ -196,9 +195,15 @@ default-authentication-plugin=mysql_native_password
set timeout 10 set timeout 10
spawn mysql_secure_installation spawn mysql_secure_installation
expect \"Enter current password for root (enter for none):\" expect \"Enter current password for root (enter for none):\"
send \"$CFG_MYSQL_ROOT_PWD\r\" send \"\r\"
expect \"Change the root password?\" expect \"Switch to unix_socket authentication:\"
send \"n\r\" 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?\" expect \"Remove anonymous users?\"
send \"y\r\" send \"y\r\"
expect \"Disallow root login remotely?\" 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