Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Programmatically changing passwords



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/ ----



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group