initdb initial password from file

Lists: pgsql-patches
From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: <pgsql-patches(at)postgresql(dot)org>
Subject: initdb initial password from file
Date: 2004-06-20 17:17:01
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE34BCE6@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Attached is a patch that adds the option --pwfile=<filename> to initdb.
The first line of this file is used to set the new superuser password
(the same way --pwprompt asks for one).

This feature is needed for the win32 GUI installer (possibly other
installers?), which need a way to specify the password to be set. Per
previous discussions commandline parameter or environment variable are
not secure. Storing it in a file is the same thing libpq does for
~/.pgpass, and should be secure enough, I think.

//Magnus

Attachment Content-Type Size
initdb_pwfile.patch application/octet-stream 6.1 KB

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Magnus Hagander" <mha(at)sollentuna(dot)net>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: initdb initial password from file
Date: 2004-06-24 19:27:52
Message-ID: 25728.1088105272@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

"Magnus Hagander" <mha(at)sollentuna(dot)net> writes:
> Attached is a patch that adds the option --pwfile=3D<filename> to initdb.

Applied with minor editorialization (printing the numeric errno isn't
my idea of friendly...)

regards, tom lane