Re: Problem with initdb -W - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Problem with initdb -W
Date
Msg-id 200211252138.gAPLcRi25573@candle.pha.pa.us
Whole thread Raw
In response to Problem with initdb -W  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Problem with initdb -W  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
It was easier than I thought.  As I now remember, it is not a problem if
pg_pwd or pg_group don't exist.  Initdb should check for pg_pwd because
it just added a password, so it better exist, but there is no reason for
pg_group to exist at this point.

I will patch 7.3 and current CVS.  I don't think this warrants another
RC candidate.  This is the type of cleanup we will be doing to the 7.3
branch for the next few months anyway as part of minor releases.


---------------------------------------------------------------------------

Bruce Momjian wrote:
> I have an IRC report, confirmed, that in RC2 initdb -W (set super-user
> password) fails:
> 
>     $ initdb -W
>     The files belonging to this database system will be owned by user
>     "postgres".
>     This user must also own the server process.
>     
>     The database cluster will be initialized with locale C.
>     
>     creating directory /u/pg/data... ok
>     creating directory /u/pg/data/base... ok
>     creating directory /u/pg/data/global... ok
>     creating directory /u/pg/data/pg_xlog... ok
>     creating directory /u/pg/data/pg_clog... ok
>     creating template1 database in /u/pg/data/base/1... ok
>     creating configuration files... ok
>     initializing pg_shadow... ok
>     Enter new superuser password: 
>     Enter it again: 
>     setting password... 
>     The group file wasn't generated. Please report this problem.
>     
>     initdb failed.
>     Removing /u/pg/data.
> 
> Of course, the obvious solution is not to use -W.  ;-)
> 
> I will research this but I wanted to report it right away.  My only
> guess is that the standalone backend to alter the super-user password is
> messing up things:
> 
>     "$PGPATH"/postgres $PGSQL_OPT template1 >/dev/null <<EOF
>         ALTER USER "$POSTGRES_SUPERUSERNAME" WITH PASSWORD '$FirstPw';
> 
> -- 
>   Bruce Momjian                        |  http://candle.pha.pa.us
>   pgman@candle.pha.pa.us               |  (610) 359-1001
>   +  If your life is a hard drive,     |  13 Roberts Road
>   +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
> 

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Problem with initdb -W
Next
From: "Christopher Kings-Lynne"
Date:
Subject: Re: Problem with initdb -W