Re: Pass password in scripts? - Mailing list pgsql-novice

From Neil Aggarwal
Subject Re: Pass password in scripts?
Date
Msg-id 000701c750a4$5c702320$0501a8c0@neilhp
Whole thread Raw
In response to Re: Pass password in scripts?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Pass password in scripts?
Re: Pass password in scripts?
List pgsql-novice
Tom:

There is no ~ directory for the db user.
The scripts run as root.

Should I put it in the home directory for root?

Thanks,
    Neil

--
Neil Aggarwal, (214)986-3533, www.JAMMConsulting.com
FREE! Eliminate junk email and reclaim your inbox.
Visit http://www.spammilter.com for details.

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Wednesday, February 14, 2007 7:35 PM
To: Neil Aggarwal
Cc: pgsql-novice@postgresql.org
Subject: Re: [NOVICE] Pass password in scripts?

"Neil Aggarwal" <neil@JAMMConsulting.com> writes:
> With mysql, I can pass the password to the database in
> the command line call to the terminal client.

Really?  That's an enormous security hole, because anyone running "ps"
on the system can see your password.

> Is there a way to do that with psql?

Consider using a ~/.pgpass file instead.  Much safer.

            regards, tom lane


pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: Pass password in scripts?
Next
From: "Neil Aggarwal"
Date:
Subject: Re: Pass password in scripts?