Re: Programmatically changing passwords

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: David Leangen <postgres(at)leangen(dot)net>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Programmatically changing passwords
Date: 2006-08-10 04:59:52
Message-ID: 44DABD48.2000007@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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/

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message David Leangen 2006-08-10 05:11:04 Re: Programmatically changing passwords
Previous Message Tom Lane 2006-08-10 04:54:54 Re: Programmatically changing passwords