1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-22 02:52:08 +03:00

Add --pwfile option to initdb, so that passwords can be set by GUI tools

that aren't able to feed the password to initdb's /dev/tty.

Magnus Hagander
This commit is contained in:
Tom Lane
2004-06-24 19:26:59 +00:00
parent a061a3f62f
commit 1b80b6da6a
3 changed files with 75 additions and 13 deletions

View File

@ -1,5 +1,5 @@
<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/initdb.sgml,v 1.29 2004/03/23 02:47:35 neilc Exp $
$PostgreSQL: pgsql/doc/src/sgml/ref/initdb.sgml,v 1.30 2004/06/24 19:26:54 tgl Exp $
PostgreSQL documentation
-->
@ -185,6 +185,16 @@ PostgreSQL documentation
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--pwfile=<replaceable>filename</></option></term>
<listitem>
<para>
Makes <command>initdb</command> read the database superuser's password
from a file. The first line of the file is taken as the password.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>

View File

@ -1,5 +1,5 @@
<!--
$PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.266 2004/06/10 22:26:17 momjian Exp $
$PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.267 2004/06/24 19:26:55 tgl Exp $
-->
<Chapter Id="runtime">
@ -121,9 +121,9 @@ postgres$ <userinput>initdb -D /usr/local/pgsql/data</userinput>
However, while the directory contents are secure, the default
client authentication setup allows any local user to connect to the
database and even become the database superuser. If you do not
trust other local users, we recommend you use
<command>initdb</command>'s <option>-W</option> or
<option>--pwprompt</option> option to assign a password to the
trust other local users, we recommend you use one of
<command>initdb</command>'s <option>-W</option>, <option>--pwprompt</option>
or <option>--pwfile</option> option to assign a password to the
database superuser.<indexterm><primary>password</><secondary>of the
superuser</></indexterm> After <command>initdb</command>, modify
the <filename>pg_hba.conf</filename> file to use <literal>md5</> or