X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id AC6969FB2CA for ; Thu, 10 Aug 2006 01:55:05 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 18697-06 for ; Thu, 10 Aug 2006 04:54:58 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id D15119FB2C1 for ; Thu, 10 Aug 2006 01:54:57 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k7A4ssOb010433; Thu, 10 Aug 2006 00:54:55 -0400 (EDT) To: David Leangen cc: pgsql-admin@postgresql.org Subject: Re: Programmatically changing passwords In-reply-to: <7176B83D-AF04-4FB9-AE6D-776660B95257@leangen.net> References: <7176B83D-AF04-4FB9-AE6D-776660B95257@leangen.net> Comments: In-reply-to David Leangen message dated "Thu, 10 Aug 2006 13:12:41 +0900" Date: Thu, 10 Aug 2006 00:54:54 -0400 Message-ID: <10432.1155185694@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200608/126 X-Sequence-Number: 22669 David Leangen writes: > I am trying to build an RPM package that will put my Postgres > installation into a known (usable) state, without requiring any > interaction. > To this effect, I need to do the following: > 1. set password for superuser Basically, you can't. The entire concept of RPM is built around the assumption that there is no user interaction during an RPM install or update. (Do "yum update" after not having done it for awhile ... watch several hundred package updates go by ... now imagine that each one of those felt that it could demand some input from you. Multiply by 10 if doing a system install from scratch.) The standard RPM-ization of Postgres does not actually have any superuser password set at all: you pretty much have to be root to get into the database the first time. Considering you also have to be root to install the package or start the service, I don't see any fundamental problem with that. regards, tom lane