I am writing a bash script that needs to authenticate a Linux box with active directory. I would like to make it so no user input is required. The problem is I have to put the password in the script, or better, in a config file. But what are the disadvantages of using a config file? Or what are things I really have to look out for?
Or is there a better way to do something like this?
EDIT: first I used the password like this: command 'password' but it was visible in when running
ps -ef | grep command so now I removed the password as argument, and I ran it like this:
command <<EOF $PASSWORD EOF
I did not see it when running
ps -ef | grep command but is it a safe way?