From: Joshua D. Drake <jd@commandprompt.com>
To: David Leangen <postgres@leangen.net>
Cc: pgsql-admin@postgresql.org
Subject: Re: Programmatically changing passwords
Date: Wed, 09 Aug 2006 21:59:52 -0700
Message-ID: <44DABD48.2000007@commandprompt.com> (raw)
In-Reply-To: <7176B83D-AF04-4FB9-AE6D-776660B95257@leangen.net>
References: <7176B83D-AF04-4FB9-AE6D-776660B95257@leangen.net>
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/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: jd@commandprompt.com, postgres@leangen.net
Subject: Re: Programmatically changing passwords
In-Reply-To: <44DABD48.2000007@commandprompt.com>
References: <7176B83D-AF04-4FB9-AE6D-776660B95257@leangen.net> <44DABD48.2000007@commandprompt.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox