Page 1 of 1

Avoid Typing Passwords In my Scripts

Posted: Sun Jan 01, 2006 9:21 am
by ashosheh
hi all ....
I connect to oracle database from my script, but i don't want to write the database username & password explicitly in the script (eg. ora_connect($username,$password))
what i'm thinking of is to make the database administrator set the username and the password and put them in the memory, so all scripts can see them.
the question is (HOW???)
i tried to use getenv() and putenv() but didn't work.

please help me.
thanx in advance

Posted: Sun Jan 01, 2006 12:55 pm
by d3ad1ysp0rk
If you're worried about other's viewing the source and getting the user and pass, then you might want to think about the fact that anyone who gets access like that could also modify the file to echo both variables.

Re: Avoid Typing Passwords In my Scripts

Posted: Mon Jan 02, 2006 4:41 pm
by shiflett
ashosheh wrote:I connect to oracle database from my script, but i don't want to write the database username & password explicitly in the script
I prefer the solution mentioned near the end of this article:

http://shiflett.org/articles/security-corner-mar2004

Hope that helps.