Command args user password

Started by NosyManalmost 21 years ago3 messagespatches
Jump to latest
#1NosyMan
nosyman@gmail.com

Hi there,

What about a command line switch which allow the user to send password via
command line arg? For example:

./vacuumdb -U username -p password

This way vacuumdb can be run by cron without "trust"-ing any user in
pg_hba.conf.

I have patched PostgreSQL 8.0.3 source to allow password as arg for:
vacuumdb, pg_dump and pg_restore. If anyone interested please reply.

Thanks,
NosyMan

#2Abhijit Menon-Sen
ams@2ndQuadrant.com
In reply to: NosyMan (#1)
Re: Command args user password

At 2005-08-15 10:09:39 +0300, nosyman@gmail.com wrote:

./vacuumdb -U username -p password

This way vacuumdb can be run by cron without "trust"-ing any
user in pg_hba.conf.

http://www.postgresql.org/docs/current/static/libpq-pgpass.html

-- ams

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: NosyMan (#1)
Re: Command args user password

NosyMan <nosyman@gmail.com> writes:

What about a command line switch which allow the user to send password via
command line arg?

You do realize that such a password could be seen by every other user on
the machine, using "ps"?

regards, tom lane