From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Lincoln Yeoh <lyeoh(at)pop(dot)jaring(dot)my>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: FW: [ppa-dev] Severe bug in debian - phppgadmin opens |
Date: | 2001-11-28 18:46:27 |
Message-ID: | 200111281846.fASIkRJ25629@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> Lincoln Yeoh <lyeoh(at)pop(dot)jaring(dot)my> writes:
> > At 01:08 AM 11/28/01 -0500, Tom Lane wrote:
> >> ... Password auth sucks from a convenience point of view
> >> (or even from a possibility point of view, for scripts; don't forget
> >> the changes that you yourself recently applied to guarantee that a
> >> script *cannot* supply a password to psql).
>
> > Ack. We can't send in passwords to psql anymore? :(
>
> Well, Bruce, you were the one that was hot to make that /dev/tty change.
> Time to defend it.
Hey, if people want it back, it is easy to do.
My only goal was to make psql consistent with other applications that
require passwords.
> > Is there a safe way to send username and password to psql?
>
> If you want to put those things in a script, you could still do
>
> export PGUSER=whatever
> export PGPASSWORD=whatever
> psql ...
>
> This would actually work a lot better than other ways for cases such
> as doing pg_dumpall, where you'd otherwise need to supply the password
> multiple times.
What about 'ps -e' that shows all environment variables? This is in
some ways worse than piping the password into psql. At least there was
some chance that they were using 'cat' from a file with the proper
permissions. WIth PGPASSWORD, there is no way to restrict who can see
it via 'ps -e'.
Seems we shouldn't allow PGPASSWORD either.
The idea of allowing the password to be stored in a file with 600
permissions seems quite standard. CVS does this.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2001-11-28 18:47:37 | Re: FW: [ppa-dev] Severe bug in debian - phppgadmin opens |
Previous Message | Bruce Momjian | 2001-11-28 18:40:43 | Re: FW: [ppa-dev] Severe bug in debian - phppgadmin opens |