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 353F09FB2CA for ; Thu, 10 Aug 2006 02:00:09 -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 91186-09 for ; Thu, 10 Aug 2006 04:59:59 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from lists.commandprompt.com (host-130.commandprompt.net [207.173.203.130]) by postgresql.org (Postfix) with ESMTP id 9F6069FB2C1 for ; Thu, 10 Aug 2006 01:59:58 -0300 (ADT) Received: from [192.168.1.50] (or-67-76-146-141.sta.embarqhsd.net [67.76.146.141]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id k7A4xu9W023533 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 9 Aug 2006 22:00:01 -0700 Message-ID: <44DABD48.2000007@commandprompt.com> Date: Wed, 09 Aug 2006 21:59:52 -0700 From: "Joshua D. Drake" Organization: Command Prompt, Inc. User-Agent: Thunderbird 1.5.0.5 (X11/20060728) MIME-Version: 1.0 To: David Leangen CC: pgsql-admin@postgresql.org Subject: Re: Programmatically changing passwords References: <7176B83D-AF04-4FB9-AE6D-776660B95257@leangen.net> In-Reply-To: <7176B83D-AF04-4FB9-AE6D-776660B95257@leangen.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.88.3, clamav-milter version 0.88.3 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); Wed, 09 Aug 2006 22:00:01 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.135 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200608/127 X-Sequence-Number: 22670 David Leangen wrote: > > Hello! > > 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 > 2. createuser user > 3. createdb -O user dbname > > > No problems with (3) above. But for (1) and (2), how can I set the > passwords programmatically, since createuser does not let me do this > (requires interactive prompt from user)? ALTER USER foo with encrypted password 'bar'; CREATE USER foo; CREATE DATABASE bar owner foo; > > > Thank you! > > > ---------------------------(end of broadcast)--------------------------- > TIP 3: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faq > -- === The PostgreSQL Company: Command Prompt, Inc. === Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240 Providing the most comprehensive PostgreSQL solutions since 1997 http://www.commandprompt.com/