pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Alfred Anzlovar <fuzzy@logon.si>
Cc: pgsql-admin@postgresql.org
Subject: Re: Authentication in batch processing
Date: Tue, 2 Jul 2002 11:25:31 -0400 (EDT)
Message-ID: <200207021525.g62FPVT12494@candle.pha.pa.us> (raw)
In-Reply-To: <a09d3977.0207011950.4266647e@posting.google.com>

Alfred Anzlovar wrote:
> pgman@candle.pha.pa.us (Bruce Momjian) wrote in message news:<200206022022.g52KM8m18308@candle.pha.pa.us>...
> > Password prompting was changed in 7.2.X.  You can now pass a script into
> > psql, and you will be prompted for the password on your terminal rather
> > than having the password coming from the script.
> > 
> > The best way send the password in 7.2.X is to use 'expect', or use the
> > PGPASSWORD environment variable. (However, on some OS's, environment
> > values like PGPASSWORD can be seen by 'ps'.)  Another option is that if
> > /dev/tty can't get opened, the password will be requested from stdin.
> > Unfortunately, I can't think of an easy way to make /dev/tty fail.
> 
> I see it as a very radical change in password processing.
> 
> I know you must have your reasons to have it this way, but there are
> people like Hal Lynch (or like me), to whom this change introduces
> many new problems (and does not solve any of security ones).

Yes, we had complaints that people were running their script and they
wouldn't be prompted for the password on their terminal.  Researching,
we found no applications that gets passwords from stdin _if_ a
controlling terminal (/dev/tty) can be opened.

> It would be nice if there was an option (in psql) to use stdin instead of
> /dev/tty to read password(s) (like before 7.2.X).
>
> Is this too much to ask?

It will read the password from stdin if there is no controlling
terminal.  Does that help?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026





view thread (13+ messages)  latest in thread

Message-ID: <200207021525.g62FPVT12494@candle.pha.pa.us>
Permalink:  ../200207021525.g62FPVT12494@candle.pha.pa.us/
Also on:    postgresql.org/message-id/200207021525.g62FPVT12494@candle.pha.pa.us

 · 

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: pgman@candle.pha.pa.us, fuzzy@logon.si
  Subject: Re: Authentication in batch processing
  In-Reply-To: <200207021525.g62FPVT12494@candle.pha.pa.us>
  References: <a09d3977.0207011950.4266647e@posting.google.com> <200207021525.g62FPVT12494@candle.pha.pa.us>

* 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