I'm just wondering if it's possible to execute a command inside a bash script as a specified user and supply the password in one string.At the moment I haveCOMMAND=${DIRECTORY}/script.shsu -c postgres $COMMANDBut this is asking me for a password which I won't be able to enter all the time as this script is going to be running in a cron every hour
Bash Script execute command as user
bash;scripting;password;parameter