in reply to PERL DBI exposing passwords on ps -ef

Don't pass the password on the command line if you don't want it to show up in ps -ef. You could pass it through %ENV (see perlvar), but that may (or may not) be visible through /proc/$$/env. You could pass it through a file, but that might be readable for other users too. You could read it from STDIN, but that will require a person to feed the information to the script. You could set up your database connection to not require a password for the given user. You could look at whether setting $0 (see perlvar, again) makes the password disappear from ps -ef on your OS.

All approaches have benefits and drawbacks.

Replies are listed 'Best First'.
Re^2: PERL DBI exposing passwords on ps -ef
by rakshas (Novice) on Apr 02, 2012 at 17:32 UTC

    Thank you for your reply. I am passing the password from a another perl module(Bad idea) but for now that is how the setup looks.