Bash script how to hide password passed as command line

31 views
Skip to first unread message

Rahul Srivastava

unread,
Oct 25, 2021, 3:00:10 PM10/25/21
to Google Apps Script Community

I am using bash shell script in our automation on Linux centos server. I am passing password in command line as mentioned below:

 ${LIQUIBASE_PATH}/liquibase --changeLogFile=${SQL_FILE} --url=jdbc:mysql://${DB_HOSTNAME}:${port}/${TARGET_DB}?user=${LIQUIBASE_USERNAME} --password=${pass_decrypted} --classpath=${LIQUIBASE_PATH}/${LIQUIBASE_MYSQLLIB} --driver=com.mysql.cj.jdbc.Driver --logLevel=info ${EXEC_TYPE} 2>&1

}

 How we can suppress password so that when anyone logs into the Linux server where script is running and gives “ps -ef” command, password is not displayed?

Thanks

Clark Lind

unread,
Oct 27, 2021, 9:02:15 PM10/27/21
to Google Apps Script Community
Hello, I think you posted in the wrong Group. 
Reply all
Reply to author
Forward
0 new messages