Skip site navigation (1) Skip section navigation (2)

Re: Windows pgpass Problems..

From: "Eric Emerton" <Eric(dot)Emerton(at)etrials(dot)com>
To: "Lane Van Ingen" <lvaningen(at)esncc(dot)com>,<pgsql-admin(at)postgresql(dot)org>
Subject: Re: Windows pgpass Problems..
Date: 2005-09-06 17:33:57
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin

I may have found the problem (or at least a way around it) - through another thread search.

The file:
C:\Program Files\PostgreSQL\<your version>\data\pg_hba.conf

..has general connection info for hitting postgres.  Mine looked like:

local   all         all                               md5
# IPv4-style local connections:
host    all         all          md5

I changed the 'md5's to 'trust' for local connections, and the prompting for Password during a .bat batch run of a backup stopped working.   I'm a bit of a Postgres rookie, so I'm not sure the ramifications of changing this to 'trust' on a more global security level.


-----Original Message-----
From: Lane Van Ingen [mailto:lvaningen(at)esncc(dot)com]
Sent: Tuesday, September 06, 2005 1:13 PM
To: Eric Emerton; pgsql-admin(at)postgresql(dot)org
Subject: RE: [ADMIN] Windows pgpass Problems..

Eric, I will be interested to see someone's response to your message,
because I am having the same problem (in Windows 2003, version 8.0). I want
to use it in a batch file that invokes psql to load a database, etc. without
prompting for a password. I have not tried to use wildcards (defeats the
purpose of what I am doing), but have used the specific values for
hostname:port:database:user:password, with no luck.

I (initially) did not know where %appdata%\postgresql should be; be sure
your pgpass.conf file is in the right place. You can find it by using this
command at the DOS command prompt:
   echo %appdata%

-----Original Message-----
From: pgsql-admin-owner(at)postgresql(dot)org
[mailto:pgsql-admin-owner(at)postgresql(dot)org]On Behalf Of Eric Emerton
Sent: Tuesday, September 06, 2005 11:25 AM
To: pgsql-admin(at)postgresql(dot)org
Subject: [ADMIN] Windows pgpass Problems..

I have been stuggling all day with the pgpass ability on 8.0 Postgres - on
Windows 2000.   I have been to the
tml> After reading many threads on similar problems, I just cannot seem to
get a batch file to recognize that pgpass is there.   I have dropped it into
the Application data directory postgresql\pgpass.conf of 'Administrator',
(My windows username), 'postgres', 'All Users', etc, etc.    The contents I
have tried for the pgpass file areeach of the combinations of:

localhost:5432:<mydbname>:<dbusername>:<the password><mydbname>:<dbusername>:<the password>
localhost:*:<mydbname>:<dbusername>:<the password>*:<mydbname>:<dbusername>:<the password>
..and many others

<dbusername> has been postgres and other test superuser accounts.   Nothing
seems to work.  I have restarted postgres, restarted windows, and it simply
wont take..

Eric Emerton

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?



pgsql-admin by date

Next:From: Lane Van IngenDate: 2005-09-06 17:55:01
Subject: Re: Windows pgpass Problems..
Previous:From: Eric EmertonDate: 2005-09-06 17:17:47
Subject: Re: Windows pgpass Problems..

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group