Re: psql shell with no password prompt

From: Steve(dot)Toutant(at)inspq(dot)qc(dot)ca
To: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: psql shell with no password prompt
Date: 2010-07-27 18:16:09
Message-ID: OFBEA1F9BE.61A9A74B-ON8525776D.0063C944-8525776D.00645AF1@isn.rtss.qc.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Thanks Kevin,
Which of these 2 methods is the best practice?

It is working with pgpass.
But not yet with hba.conf
I tried this without success.
host all all 127.0.0.1/32 trust

steve

"Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
27/07/2010 01:17 PM

A
<Steve(dot)Toutant(at)inspq(dot)qc(dot)ca>, <pgsql-admin(at)postgresql(dot)org>
cc

Objet
Re: [ADMIN] psql shell with no password prompt

<Steve(dot)Toutant(at)inspq(dot)qc(dot)ca> wrote:

> The script prompt for a password for user dbadmin.
> How to avoid that? I guess there is a config so dbadmin will
> "trust" this new user....

You can use pg_hba.conf or pgpass:

http://www.postgresql.org/docs/current/interactive/auth-pg-hba-conf.html

http://www.postgresql.org/docs/current/interactive/libpq-pgpass.html

-Kevin

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Joshua D. Drake 2010-07-27 18:24:04 Re: psql shell with no password prompt
Previous Message Kevin Grittner 2010-07-27 17:17:08 Re: psql shell with no password prompt