Re: Authentication in batch processing

From: Alfred Anzlovar <fredi(at)biff(dot)logon(dot)si>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Alfred Anzlovar <fuzzy(at)logon(dot)si>, <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Authentication in batch processing
Date: 2002-07-04 15:21:17
Message-ID: Pine.LNX.4.33.0207041647280.24817-100000@biff.logon.si
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Tue, 2 Jul 2002, Bruce Momjian wrote:

> 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.

Yes, this would (usually) be the case with scripts that are used by
end-users or are run one at a time.

But I have two different sets of shell scripts, that are always run
interactively (they have a readble/writable /dev/tty) and execute
psql several times. First set has sometimes results processed and user
(operator) has to provide answers. Since these scripts are
'privileged' in some way, I do not want the passwords to be known to
operators, so I keep them in a safe place and provide them to psql
scripts via stdin.

Second set is related tightly to the development cycle and deals
with creation of application environment (database, users, languages,
tables, initial data, etc.) where passwords are not sensitive.
Because different psql scripts access same database several times I am
now forced to type the password again and again and ... so on and so forth
(as lord Farquad would put it :).

So an option to FORCE reading password from stdin would be nice (without
prompting, of course).

Maybe this could/can be done differently, but as it was, it was so easy
and nice. And if there are more of us, poor souls, with comparable
problems maybe an option called '--pwd-from-stdin-only' would be a
solution. Another option (thanks God for Open Source projects) is adding
an option for prompting into psql by myself. But I see this is a rather
drastic measure to get what I need/want.

Thanks and greetings from the Sunny side of the Alps!
Alfred Anzlovar

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Bruce Momjian 2002-07-04 15:23:25 Re: Authentication in batch processing
Previous Message Bruce Momjian 2002-07-04 14:26:48 Re: Which DB is using space.