Encryption of .pgpass

From: "Hiroshi Saito" <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp>
To: <pgsql-patches(at)postgresql(dot)org>
Cc: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>
Subject: Encryption of .pgpass
Date: 2006-05-09 14:46:24
Message-ID: 01aa01c67377$58af1710$01324d80@hiroshi5jz7dqj
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Dear Bruce san.

I may be quite persistent.:-)
I seasoned the proposal method. It was very painful that the
conventional connection method to this password was a plain text.
Although I am simple, I desire the support. Furthermore, the relation
between a field item and an environment variable is complicated.

ex.)
inetrt% pqpasswd -U postgres -d postgres
New Password:
Retype New Password:
Succeeded in creation.
inetrt% pqpasswd -U postgres -d postgres -l
/home/saito/.pgpass
hostname=localhost port=5432 dbname=postgres username=postgres password=**********
This 1th line is used.
inetrt% cat /home/saito/.pgpass
localhost:5432:postgres:postgres:postgres
inetrt% psql postgres postgres
Welcome to psql 8.2devel, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit
postgres=#

inetrt% rm /home/saito/.pgpass
inetrt% pqpasswd -U postgres -d postgres -m
New Password:
Retype New Password:
Succeeded in creation.
inetrt% pqpasswd -U postgres -d postgres -m -l
/home/saito/.pgpass.md5
hostname=localhost port=5432 dbname=postgres username=postgres password=**********
This 1th line is used.
inetrt% cat /home/saito/.pgpass.md5
localhost:5432:postgres:postgres:md53175bce1d3201d16594cebf9d7eb3f9d
inetrt% psql postgres postgres
Welcome to psql 8.2devel, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit
postgres=#

inetrt% rm /home/saito/.pgpass.md5
inetrt% psql postgres postgres
Password for user postgres:
Welcome to psql 8.2devel, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit

I tried correspondence by sufix of md5 to .pgpass, in order to maintain compatibility.
I wish that it is fully reviewed. Thanks.

Regards,
Hiroshi Saito

Attachment Content-Type Size
pqpasswd_patch application/octet-stream 14.6 KB

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Martijn van Oosterhout 2006-05-09 15:11:02 Re: Cleaning up multiply-defined-symbol warnings on OS X
Previous Message Tom Lane 2006-05-09 13:56:01 Re: current version: Patch - Have psql show current values