pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
hiding the postgres password - v8.1.0
3+ messages / 3 participants
[nested] [flat]

* hiding the postgres password - v8.1.0
@ 2006-03-20 21:19  Mr. Dan <bitsandbytes88@hotmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Mr. Dan @ 2006-03-20 21:19 UTC (permalink / raw)
  To: pgsql-admin

Hi,

Is there a way to hide or encrypt the postgres password when the postgres 
user is required to be the user in a shell script?   This way we could have 
a function called in a program, and the users could do something with out 
actually seeing the postgres user password.

We have tried putting the postgres user password in a perl script, however 
when we run the script we get password coming up interactively as the perl 
script is running doing a pg_dump or createdb for example.

We want regular users to be able to pg_dump, drop, create, vacuum etc.  
Postgres is the owner of our data directory.  The group permission are in a 
sys - admin group.

Thanks for any feedback,
~DjK





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

* Re: hiding the postgres password - v8.1.0
@ 2006-03-20 21:23  Alvaro Herrera <alvherre@commandprompt.com>
  parent: Mr. Dan <bitsandbytes88@hotmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Alvaro Herrera @ 2006-03-20 21:23 UTC (permalink / raw)
  To: Mr. Dan <bitsandbytes88@hotmail.com>; +Cc: pgsql-admin

Mr. Dan wrote:

> Is there a way to hide or encrypt the postgres password when the postgres 
> user is required to be the user in a shell script?   This way we could have 
> a function called in a program, and the users could do something with out 
> actually seeing the postgres user password.

See the docs for the .pgpass file, in the libpq section (Interfaces).

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support



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

* Re: hiding the postgres password - v8.1.0
@ 2006-03-20 22:47  Bruno Wolff III <bruno@wolff.to>
  parent: Alvaro Herrera <alvherre@commandprompt.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Bruno Wolff III @ 2006-03-20 22:47 UTC (permalink / raw)
  To: Mr. Dan <bitsandbytes88@hotmail.com>; pgsql-admin

On Mon, Mar 20, 2006 at 17:23:43 -0400,
  Alvaro Herrera <alvherre@commandprompt.com> wrote:
> Mr. Dan wrote:
> 
> > Is there a way to hide or encrypt the postgres password when the postgres 
> > user is required to be the user in a shell script?   This way we could have 
> > a function called in a program, and the users could do something with out 
> > actually seeing the postgres user password.
> 
> See the docs for the .pgpass file, in the libpq section (Interfaces).

You also might consider using ident authentication if the scripts run on the
database server and the OS supports getting the id of who is connected to
a domain socket.



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


end of thread, other threads:[~2006-03-20 22:47 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-03-20 21:19 hiding the postgres password - v8.1.0 Mr. Dan <bitsandbytes88@hotmail.com>
2006-03-20 21:23 ` Alvaro Herrera <alvherre@commandprompt.com>
2006-03-20 22:47   ` Bruno Wolff III <bruno@wolff.to>

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