| From: | David Leangen <postgres(at)leangen(dot)net> |
|---|---|
| To: | pgsql-admin(at)postgresql(dot)org |
| Subject: | Re: Programmatically changing passwords |
| Date: | 2006-08-10 06:06:52 |
| Message-ID: | 5EF713B4-80FE-4BF8-ACFD-749F19CF42DC@leangen.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-admin |
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(dot)pundt(at)rp-online(dot)de> ---- http://rp-online.de/
> ----
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Sun Sun | 2006-08-10 09:00:25 | unsubscribe |
| Previous Message | Thomas Pundt | 2006-08-10 05:36:36 | Re: Programmatically changing passwords |