From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Andreas Pflug <pgadmin(at)pse-consulting(dot)de>, Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: PGPASSWORD and client tools |
Date: | 2004-08-19 02:02:49 |
Message-ID: | 41240A49.7010607@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Tom Lane wrote:
>Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> writes:
>
>
>>>After some tests, I found that using the PGPASSWORD environment variable
>>>will do the job. I'm a bit irritated that it's marked "deprecated" in
>>>the docs, the .pgpass solution isn't a good one for tool managed passwords.
>>>
>>>
>
>
>
>>I didn't notice it was deprecated either - it's the only way that
>>phpPgAdmin can integrate with pg_dump...
>>
>>
>
>It's deprecated because it's insecure, on platforms where other users can
>see the environment variables passed to pg_dump (which apparently is
>quite a few variants of Unix). You wouldn't pass the password on the
>command line either ...
>
>Painful as .pgpass may be for an admin tool, I do not know of any other
>method I'd recommend on a multiuser machine.
>
>
>
>
How about an environment variable that points to a .pgpass type file. Or
we could even play games with PGPASSWORD - if it names an existing file
that satisfies the .pgpass criteria then it will be taken as the
location of the .pgpass file instead of $HOME/.pgpass - otherwise its
value will be considered to be the password itself. The Chris could have
phppgadmin write the password file, set the environment var and call
pg_dump happily (and remove the file afterwards).
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-08-19 02:03:00 | More fun with dropped columns |
Previous Message | Bruce Momjian | 2004-08-19 01:54:02 | Re: pg_dump 'die_on_errors' |
From | Date | Subject | |
---|---|---|---|
Next Message | Christopher Kings-Lynne | 2004-08-19 02:03:57 | Re: PGPASSWORD and client tools |
Previous Message | Bruce Momjian | 2004-08-19 01:54:02 | Re: pg_dump 'die_on_errors' |