Unix Technical Forum

Windows pgpass Problems..

This is a discussion on Windows pgpass Problems.. within the pgsql Admins forums, part of the PostgreSQL category; --> I have been stuggling all day with the pgpass ability on 8.0 Postgres - on Windows 2000. I have ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Admins

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 06:13 AM
Eric Emerton
 
Posts: n/a
Default 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 documentation:<http://www.postgresql.org/docs/8.0/interactive/libpq-pgpass.html> 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>
127.0.0.1:5432:<mydbname>:<dbusername>:<the password>
localhost:*:<mydbname>:<dbusername>:<the password>
127.0.0.1:*:<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..

Regards,
Eric Emerton


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

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 06:13 AM
Lane Van Ingen
 
Posts: n/a
Default Re: 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
hostnameort:database:userassword, 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@postgresql.org
[mailtogsql-admin-owner@postgresql.org]On Behalf Of Eric Emerton
Sent: Tuesday, September 06, 2005 11:25 AM
To: pgsql-admin@postgresql.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
documentation:<http://www.postgresql.org/docs/8.0/i...libpq-pgpass.h
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>
127.0.0.1:5432:<mydbname>:<dbusername>:<the password>
localhost:*:<mydbname>:<dbusername>:<the password>
127.0.0.1:*:<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..

Regards,
Eric Emerton


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

http://archives.postgresql.org



---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-10-2008, 06:13 AM
Alvaro Herrera
 
Posts: n/a
Default Re: Windows pgpass Problems..

On Tue, Sep 06, 2005 at 11:24:45AM -0400, Eric Emerton wrote:
> I have been stuggling all day with the pgpass ability on 8.0 Postgres
> - on Windows 2000. I have been to the
> documentation:<http://www.postgresql.org/docs/8.0/interactive/libpq-pgpass.html>
> 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>
> 127.0.0.1:5432:<mydbname>:<dbusername>:<the password>
> localhost:*:<mydbname>:<dbusername>:<the password>
> 127.0.0.1:*:<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..


Which program fails, and how does it fail?

You have the correct permissions on the file, I presume? The file
should not be readable nor writable by anyone but the owner; and I
assume the directory where it resides, shouldn't either (In fact I'd
check every directory up in the path.)

--
Alvaro Herrera -- Valdivia, Chile Architect, www.EnterpriseDB.com
"Entristecido, Wutra (canción de Las Barreras)
echa a Freyr a rodar
y a nosotros al mar"

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-10-2008, 06:13 AM
Scott Marlowe
 
Posts: n/a
Default Re: Windows pgpass Problems..

On Tue, 2005-09-06 at 10:24, Eric Emerton wrote:
> I have been stuggling all day with the pgpass ability on 8.0 Postgres - on Windows 2000. I have been to the documentation:<http://www.postgresql.org/docs/8.0/interactive/libpq-pgpass.html> 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>
> 127.0.0.1:5432:<mydbname>:<dbusername>:<the password>
> localhost:*:<mydbname>:<dbusername>:<the password>
> 127.0.0.1:*:<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..


Has it been set to be readable only by the given user who is using it?

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:33 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com