pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Achilleas Mantzios <achill@matrix.gatewaynet.com>
To: pgsql-admin@postgresql.org
Cc: Medi Montaseri <montaseri@gmail.com>
Cc: Илья Скорик <ilya.skorik@inprint.ru>
Subject: Re: How add db users from shell script with their passwords?
Date: Tue, 3 Jun 2008 13:00:02 +0300
Message-ID: <200806031300.03277.achill@matrix.gatewaynet.com> (raw)
In-Reply-To: <8078a1730806030128n791e9c30v254e896588875468@mail.gmail.com>
References: <2dfe6d090806030054xba3b05bu5faf1de9c09e6929@mail.gmail.com>
	<8078a1730806030128n791e9c30v254e896588875468@mail.gmail.com>

Στις Tuesday 03 June 2008 11:28:44 ο/η Medi Montaseri έγραψε:
> You can write a program in say Perl and use "create user bob with
> .....options ....encrypted password xxxxx valid until xxx " which is pretty
> much what createuser(1) does.
> 

why not just

#!/bin/sh
psql -c "CREATE USER foo PASSWORD 'bar'"


> Cheers
> Medi
> 
> On Tue, Jun 3, 2008 at 12:54 AM, Илья Скорик <ilya.skorik@inprint.ru> wrote:
> 
> > Dear community, help please.
> >
> > I need to add some standard users to database together with their
> > standard passwords from a shell script. That the script would not ask
> > to enter passwords manually for each user. How it can be made?
> >
> > How I have understood, createuser comand does not allow to make it?
> >
> > In advance thanks.
> >
> > --
> > --
> > С уважением, Илья Скорик
> > специалист
> > Inprint - автоматизация вашего издательства
> >
> > Yours faithfully, Ilya Skorik
> > the expert
> > Inprint - automation of your publishing house
> >
> > e-mail: ilya.skorik@inprint.ru
> > web: http://www.inprint.ru/
> >
> > --
> > Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
> > To make changes to your subscription:
> > http://www.postgresql.org/mailpref/pgsql-admin
> >
> 



-- 
Achilleas Mantzios



view thread (3+ messages)

Message-ID: <200806031300.03277.achill@matrix.gatewaynet.com>
Permalink:  ../200806031300.03277.achill@matrix.gatewaynet.com/
Also on:    postgresql.org/message-id/200806031300.03277.achill@matrix.gatewaynet.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: achill@matrix.gatewaynet.com, montaseri@gmail.com, ilya.skorik@inprint.ru
  Subject: Re: How add db users from shell script with their passwords?
  In-Reply-To: <200806031300.03277.achill@matrix.gatewaynet.com>

* 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