If you don't want direct user input, the next easiest thing is to take the password from the the command line and or environment variables. That way the password is volatile and you can defer the responsibility to the user and let them decide wether they want to further automate, for example by using a shell script, or not.
holli
You can lead your users to water, but alas, you cannot drown them.