pg.ddx.io pgsql-bugs@postgresql.org mailing list archivehelp / color / mirror / Atom feed
BUG #5921: pg_dump asks for password 2+ messages / 2 participants [nested] [flat]
* BUG #5921: pg_dump asks for password @ 2011-03-09 14:04 sandyt <sandy@mcw.co.il> 0 siblings, 1 reply; 2+ messages in thread From: sandyt @ 2011-03-09 14:04 UTC (permalink / raw) To: pgsql-bugs The following bug has been logged online: Bug reference: 5921 Logged by: sandyt Email address: sandy@mcw.co.il PostgreSQL version: 8.3.8 Operating system: windows 2008 server (64 bit) Description: pg_dump asks for password Details: We want to be able to run a nightly backup using the pg_dump command. Unfortunately, even with the pg_hba.conf fix of adding host postgres … trust, It still asks for a password. 1. Is this a 64bit issue? If the server was 32bit, would it not ask for a password? 2. Is there a way of running a dos script that would run the pg_dump providing a password when prompted? 3. Is there a way of running the pg_dump with a user that doesn't have a password? Thanks ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #5921: pg_dump asks for password @ 2011-03-10 04:01 Josh Kupershmidt <schmiddy@gmail.com> parent: sandyt <sandy@mcw.co.il> 0 siblings, 0 replies; 2+ messages in thread From: Josh Kupershmidt @ 2011-03-10 04:01 UTC (permalink / raw) To: sandyt <sandy@mcw.co.il>; +Cc: pgsql-bugs On Wed, Mar 9, 2011 at 9:04 AM, sandyt <sandy@mcw.co.il> wrote: > > The following bug has been logged online: > > Bug reference: 5921 > Logged by: sandyt > Email address: sandy@mcw.co.il > PostgreSQL version: 8.3.8 > Operating system: windows 2008 server (64 bit) > Description: pg_dump asks for password > Details: > > We want to be able to run a nightly backup using the pg_dump command. > > Unfortunately, even with the pg_hba.conf fix of adding host postgres … > trust, > > It still asks for a password. > > > > 1. Is this a 64bit issue? If the server was 32bit, would it not ask for a > password? This shouldn't matter. > 2. Is there a way of running a dos script that would run the pg_dump > providing a password when prompted? Yup, if you set up trust authentication in your pg_hba.conf file correctly. Or you can also create a ".pgpass" file from which psql can load its password automatically, see: http://www.postgresql.org/docs/9.0/static/libpq-pgpass.html > 3. Is there a way of running the pg_dump with a user that doesn't have a > password? To recap, you can either create the .pgpass file mentioned above, or you can fix your pg_hba.conf file to trust local connections (or connections from whatever machine you're connecting from). Here are some common pitfalls I can think of that you might want to double check * did you remember to use "pg_ctl ... reload" or some other means to notify Postgres that you've changed its pg_hba.conf file? * maybe you're connecting to Postgres from a different address than you specified in the Address field of pg_hba.conf? Set log_connections = on in your postgresql.conf and run pg_ctl ... reload to have Postgres print what address it actually sees your connections coming from in its log. * If you are using psql to connect to a Postgres server on the same machine, and you would like to trust all users on that machine to login to Postgres as a superuser, your pg_hba.conf should have lines like this: # "local" is for Unix domain socket connections only local all all trust # IPv4 local connections: host all all 127.0.0.1/32 trust # IPv6 local connections: host all all ::1/128 trust If you're still having trouble, post the uncommented lines from your pg_hba.conf file, and also post lines about connection attempts from your PostgreSQL server log file after you've turned on log_connections. Josh ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2011-03-10 04:01 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2011-03-09 14:04 BUG #5921: pg_dump asks for password sandyt <sandy@mcw.co.il> 2011-03-10 04:01 ` Josh Kupershmidt <schmiddy@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox