Originally posted by: shyhc
Hello @all,
I want to improve a shell script that has several curl calls (to a datapower box) and want to avoid that the user has to enter his (personal) passphrase every time.
My idea is to query the password into a (non-exported) variable in the script and use something like
curl .... -K - ... << EOF -u $
{user
}:$
{password
} EOF
where -K - instructs curl to read command line parameters from stdin (actually a redirected config file), and -u user:password is the way to pass these to curl.
When using it in the command line itself, the complete << .. here document appears in the shell history, but when called from a script, this does not happen.
Is there a security hole in this solution? Could anyone see the here document or get access to the variables when they are not exported to the environment? Any experts have a suggestion?
Thanks a lot & kind regards,
Stefan
#AIX-Forum