pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Leangen <postgres@leangen.net>
To: pgsql-admin@postgresql.org
Subject: Re: Programmatically changing passwords
Date: Thu, 10 Aug 2006 15:06:52 +0900
Message-ID: <5EF713B4-80FE-4BF8-ACFD-749F19CF42DC@leangen.net> (raw)
In-Reply-To: <200608100736.36463.mlists@rp-online.de>
References: <7176B83D-AF04-4FB9-AE6D-776660B95257@leangen.net>
	<44DABD48.2000007@commandprompt.com>
	<90A14169-077A-4BB0-84BF-8B776DB98370@leangen.net>
	<200608100736.36463.mlists@rp-online.de>


Awesome, thank you!

That is exactly what I needed.

Didn't know it was that simple... duh!


On Aug 10, 2006, at 14:36, Thomas Pundt wrote:

> On Thursday 10 August 2006 07:12, David Leangen wrote:
> | > ALTER USER foo with encrypted password 'bar';
> | > CREATE USER foo;
> | > CREATE DATABASE bar owner foo;
> |
> | That makes perfect sense, but how can I do this from the shell? Is
> | there an easy way to wrap these so I can send them to postgres from
> | the shell?
>
> yes; the following should work:
>
> #!/bin/bash
> psql <<_EOT_
> ALTER USER foo with encrypted password 'bar';
> CREATE USER foo;
> CREATE DATABASE bar owner foo;
> _EOT_
>
>
> Ciao,
> Thomas
>
> --  
> Thomas Pundt <thomas.pundt@rp-online.de> ---- http://rp-online.de/  
> ----
>
> ---------------------------(end of  
> broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings




view thread (8+ messages)

Message-ID: <5EF713B4-80FE-4BF8-ACFD-749F19CF42DC@leangen.net>
Permalink:  ../5EF713B4-80FE-4BF8-ACFD-749F19CF42DC@leangen.net/
Also on:    postgresql.org/message-id/5EF713B4-80FE-4BF8-ACFD-749F19CF42DC@leangen.net

 · 

reply

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: postgres@leangen.net
  Subject: Re: Programmatically changing passwords
  In-Reply-To: <5EF713B4-80FE-4BF8-ACFD-749F19CF42DC@leangen.net>
  References: <7176B83D-AF04-4FB9-AE6D-776660B95257@leangen.net> <44DABD48.2000007@commandprompt.com> <90A14169-077A-4BB0-84BF-8B776DB98370@leangen.net> <200608100736.36463.mlists@rp-online.de> <5EF713B4-80FE-4BF8-ACFD-749F19CF42DC@leangen.net>

* 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