pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Brannen <kevinb@nurseamerica.net>
To: Michael A. Schulte <michael.schulte@sun.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: psql in Batch mode and passwords?
Date: Tue, 09 Jul 2002 10:22:35 -0500
Message-ID: <3D2AFFBB.6010801@nurseamerica.net> (raw)
References: <3D2AA41B.7070608@sun.com>

Michael A. Schulte wrote:
> Hi,
> 
> does anyone have an idea how to convince psql
> to accept a password that is passed during startup
> of psql in the command line?
> 
> I don't want to modify pg_hba.conf so that it
> is open for everyone so I have inserted:
> 
> local      all                                          trust
> host       all         129.157.0.0     255.255.0.0    password
> 
> 
> I look for something like:
> psql -h somehost -a dash anonymous/anonym
> where there exists a postgres user named "anonymous"
> and the password is anonym.

Try (assume a sh or ksh shell):

PGPASSWORD=anonym psql -h somehost -U anonymous -a dash

HTH,
Kevin




view thread (3+ messages)

Message-ID: <3D2AFFBB.6010801@nurseamerica.net>
Permalink:  ../3D2AFFBB.6010801@nurseamerica.net/
Also on:    postgresql.org/message-id/3D2AFFBB.6010801@nurseamerica.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: kevinb@nurseamerica.net, michael.schulte@sun.com
  Subject: Re: psql in Batch mode and passwords?
  In-Reply-To: <3D2AFFBB.6010801@nurseamerica.net>
  References: <3D2AA41B.7070608@sun.com> <3D2AFFBB.6010801@nurseamerica.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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