I would like to add capability to initdb to accept the password for the
superuser account at invocation. Right now, I can use --pwprompt or -W
to have it ask for a password. But for the win32 GUI installed I'd like
to ask for the password in the installer, and pass it to initdb.

Considering how it's done in different places, what's the preferred way
to do this? Commandline parameter? Environment variable? Other (what
would that be?)


//Magnus


Tue, 15 Jun 2004 23:53:46 +0200
"Magnus Hagander" <mha@sollentuna.net>
initdb initial password
"Magnus Hagander" <mha@sollentuna.net> writes:
> I would like to add capability to initdb to accept the password for the
> superuser account at invocation. Right now, I can use --pwprompt or -W
> to have it ask for a password. But for the win32 GUI installed I'd like
> to ask for the password in the installer, and pass it to initdb.
> Considering how it's done in different places, what's the preferred way
> to do this? Commandline parameter? Environment variable? Other (what
> would that be?)

There's a reason why it's done that way, which is that the others are
all insecure.  At least on some Unixen.

			regards, tom lane

Tue, 15 Jun 2004 18:21:59 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: initdb initial password 
Tom Lane said:
> "Magnus Hagander" <mha@sollentuna.net> writes:
>> I would like to add capability to initdb to accept the password for
>> the superuser account at invocation. Right now, I can use --pwprompt
>> or -W to have it ask for a password. But for the win32 GUI installed
>> I'd like to ask for the password in the installer, and pass it to
>> initdb. Considering how it's done in different places, what's the
>> preferred way to do this? Commandline parameter? Environment variable?
>> Other (what would that be?)
>
> There's a reason why it's done that way, which is that the others are
> all insecure.  At least on some Unixen.
>

I think a parameter to have initdb read the password from a file ought to
be safe enough. Mark it as one of the less used options - it's really only
of significant benefit for installers, I should think.

cheers

andrew



Tue, 15 Jun 2004 18:39:51 -0400 (EDT)
"Andrew Dunstan" <andrew@dunslane.net>
Re: initdb initial password