pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
psql in Batch mode and passwords?
3+ messages / 3 participants
[nested] [flat]

* psql in Batch mode and passwords?
@ 2002-07-09 08:51 Michael A. Schulte <michael.schulte@sun.com>
  2002-07-09 15:22 ` Re: psql in Batch mode and passwords? Kevin Brannen <kevinb@nurseamerica.net>
  0 siblings, 1 reply; 3+ messages in thread

From: Michael A. Schulte @ 2002-07-09 08:51 UTC (permalink / raw)
  To: pgsql-admin

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.

Best regards,
Michael






^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: psql in Batch mode and passwords?
  2002-07-09 08:51 psql in Batch mode and passwords? Michael A. Schulte <michael.schulte@sun.com>
@ 2002-07-09 15:22 ` Kevin Brannen <kevinb@nurseamerica.net>
  0 siblings, 0 replies; 3+ messages in thread

From: Kevin Brannen @ 2002-07-09 15:22 UTC (permalink / raw)
  To: Michael A. Schulte <michael.schulte@sun.com>; +Cc: pgsql-admin

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




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: psql in Batch mode and passwords?
@ 2002-07-09 15:08 Guthrie, John <JGuthrie@air.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Guthrie, John @ 2002-07-09 15:08 UTC (permalink / raw)
  To: 'Michael A. Schulte' <michael.schulte@sun.com>; pgsql-admin

I've used expect before, thinking I might try out Jython now...

John

-----Original Message-----
From: Michael A. Schulte [mailto:michael.schulte@sun.com]
Sent: Tuesday, July 09, 2002 4:52 AM
To: pgsql-admin@postgresql.org
Subject: [ADMIN] psql in Batch mode and passwords?


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.

Best regards,
Michael




---------------------------(end of broadcast)---------------------------
TIP 3: 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




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2002-07-09 15:22 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-07-09 08:51 psql in Batch mode and passwords? Michael A. Schulte <michael.schulte@sun.com>
2002-07-09 15:22 ` Kevin Brannen <kevinb@nurseamerica.net>
2002-07-09 15:08 Re: psql in Batch mode and passwords? Guthrie, John <JGuthrie@air.org>

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