Re: Programmatically changing passwords

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxx> ---- http://rp-online.de/ ----


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux