Re: pg_dumpall and password access - Mailing list pgsql-sql

From Tom Lane
Subject Re: pg_dumpall and password access
Date
Msg-id 29370.986340578@sss.pgh.pa.us
Whole thread Raw
In response to pg_dumpall and password access  (Christophe Labouisse <labouiss@cybercable.fr>)
Responses Re: pg_dumpall and password access
List pgsql-sql
Christophe Labouisse <labouiss@cybercable.fr> writes:
> I'm trying to run pg_dumpall to backup all my users' bases but since I
> have configure pg_hba.conf to "passwd" pg_dumpall always fails:

pg_dumpall doesn't work very well with password authentication (and
even if it did, storing the password in a cron script doesn't seem
like a good idea to me).

As long as the dumper will run on the same machine as the database
server, consider using IDENT authorization instead.  You'll need an
identd daemon running, and you'll need to use a TCP connection because
IDENT only works with TCP connections.  The simplest form of pg_hba.conf
entry is

host         all         127.0.0.1     255.255.255.255     ident sameuser

If you have no other users you want to let in, you could use an explicit
ident map instead of 'sameuser' to tighten this up even more.  See the
admin documentation for more info.

I don't recommend using IDENT for connections from untrusted machines,
but on localhost it's as trustworthy as your local sysadmin...
        regards, tom lane


pgsql-sql by date:

Previous
From: Christophe Labouisse
Date:
Subject: pg_dumpall and password access
Next
From: Stephen Jackson
Date:
Subject: Re: Implicit/Explicit casting of the unknown type