Re: Encryption of .pgpass

Lists: pgsql-patches
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
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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Hiroshi Saito" <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp>
Cc: pgsql-patches(at)postgresql(dot)org, "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>
Subject: Re: Encryption of .pgpass
Date: 2006-05-09 15:55:06
Message-ID: 12205.1147190106@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

"Hiroshi Saito" <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp> writes:
> 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.

What is the point of this? It seems to be complicating life to little
purpose (except storing passwords that will fail in non-MD5 password
methods --- given that people are talking about replacing MD5, that
doesn't seem like a good forward-looking idea).

regards, tom lane


From: "Hiroshi Saito" <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-patches(at)postgresql(dot)org>, "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>
Subject: Re: Encryption of .pgpass
Date: 2006-05-09 16:29:18
Message-ID: 020e01c67385$b8606ed0$01324d80@hiroshi5jz7dqj
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

From: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>

> What is the point of this? It seems to be complicating life to little
> purpose (except storing passwords that will fail in non-MD5 password
> methods --- given that people are talking about replacing MD5, that
> doesn't seem like a good forward-looking idea).

Ahh, yes. It is "crypt" ,"ident" and "pam"...
I do not think that "passwd" should be used primarily.
Then, So, it is clear sufix of md5. It may be a narrower use.
However, I have simplified that it can use as a method of
hiding it. It is suggestion. Is it accepted by including "crypt"?

Thanks.

Regards,
Hiroshi Saito