So i am trying to figure out how to NOT display my password once its gets passed on to OS from cloudformation. So first i am using below on my cloudformation script, with "NoEcho" the password that i put in is started out...
"DBPASS" : { "NoEcho" : "true", "Description" : "Password for oracle user", "Type" : "String", "MinLength" : "1", "MaxLength" : "20" },
then in the user data section of my cloud formation i do below to set the password for oracle user. But the problem is that the user is echo'ed out to the boot.log/cloud-init.log so the password is visible...i am trying to hide the password so its not seen in the logs.
"DBPASS=", { "Ref": "DBPASS" }, "\n",
"echo -e \"$DBPASS\n$DBPASS\" | passwd $oracle\n",
Then i was thinking of doing something like below but not sure how to pass in "DBPASS" variable to the input twice..
stty -echo read DBPASS stty echo
My Goal is to set the password for oracle user without echoing out to the logs...