From e06958d44cb517d773bb33cd0b4f57da58824e84 Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Wed, 7 Feb 2018 15:53:16 -0500 Subject: [PATCH] working okay now for revamp the mysql password management seems to be doing well now. --- scripts/security/password_functions.sh | 4 ---- scripts/site_avenger/revamp_cakelampvm.sh | 17 +---------------- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/scripts/security/password_functions.sh b/scripts/security/password_functions.sh index ca365fd2..f1e0df13 100644 --- a/scripts/security/password_functions.sh +++ b/scripts/security/password_functions.sh @@ -28,8 +28,6 @@ function load_password() # return the password in the variable they provided. eval $varname="$passwd" -#echo varname is: $varname -#echo new value of that variable is ${!varname} } # stores a password into a password file. the password file should be the @@ -75,8 +73,6 @@ function read_password() stty $stty_orig # return the password in the variable they provided. eval $varname="$the_passwd" -#echo varname is: $varname -#echo new value of that variable is ${!varname} } diff --git a/scripts/site_avenger/revamp_cakelampvm.sh b/scripts/site_avenger/revamp_cakelampvm.sh index f8c2ebe2..c01a9da6 100644 --- a/scripts/site_avenger/revamp_cakelampvm.sh +++ b/scripts/site_avenger/revamp_cakelampvm.sh @@ -22,30 +22,15 @@ source "$FEISTY_MEOW_SCRIPTS/security/password_functions.sh" ############## -# new requirement to have the sql root password, since we need to do some sql db configuration. - -echo A +# it's a requirement to have sql root password, since we may need some sql db configuration. load_password /etc/mysql/secret_password mysql_passwd -echo B if [ -z "$mysql_passwd" ]; then -echo C read_password "Please enter the MySQL root account password:" mysql_passwd -echo D -echo password was found as: $mysql_passwd -# echo -n "Please enter the MySQL root account password: " -# # turn off echo but remember former setting. -# stty_orig=`stty -g` -# stty -echo -# read mysql_passwd -# # turn echo back on. -# stty $stty_orig fi if [ -z "$mysql_passwd" ]; then -echo E echo "This script must have the sql root password to proceed." exit 1 else -echo F store_password /etc/mysql/secret_password "$mysql_passwd" fi -- 2.34.1