initdb initial password from file

Started by Magnus Haganderover 22 years ago2 messagespatches
Jump to latest
#1Magnus Hagander
magnus@hagander.net

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

Attachments:

initdb_pwfile.patchapplication/octet-stream; name=initdb_pwfile.patchDownload+66-27
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Magnus Hagander (#1)
Re: initdb initial password from file

"Magnus Hagander" <mha@sollentuna.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