pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedHow add db users from shell script with their passwords?
3+ messages / 3 participants
[nested] [flat]
* How add db users from shell script with their passwords?
@ 2008-06-03 07:54 Илья Скорик <ilya.skorik@inprint.ru>
0 siblings, 1 reply; 3+ messages in thread
From: Илья Скорик @ 2008-06-03 07:54 UTC (permalink / raw)
To: pgsql-admin
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/
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: How add db users from shell script with their passwords?
@ 2008-06-03 08:28 Medi Montaseri <montaseri@gmail.com>
parent: Илья Скорик <ilya.skorik@inprint.ru>
0 siblings, 1 reply; 3+ messages in thread
From: Medi Montaseri @ 2008-06-03 08:28 UTC (permalink / raw)
To: Илья Скорик <ilya.skorik@inprint.ru>; +Cc: pgsql-admin
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.
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
>
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: How add db users from shell script with their passwords?
@ 2008-06-03 10:00 Achilleas Mantzios <achill@matrix.gatewaynet.com>
parent: Medi Montaseri <montaseri@gmail.com>
0 siblings, 0 replies; 3+ messages in thread
From: Achilleas Mantzios @ 2008-06-03 10:00 UTC (permalink / raw)
To: pgsql-admin; +Cc: Medi Montaseri <montaseri@gmail.com>; Илья Скорик <ilya.skorik@inprint.ru>
Στις 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
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2008-06-03 10:00 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-06-03 07:54 How add db users from shell script with their passwords? Илья Скорик <ilya.skorik@inprint.ru>
2008-06-03 08:28 ` Medi Montaseri <montaseri@gmail.com>
2008-06-03 10:00 ` Achilleas Mantzios <achill@matrix.gatewaynet.com>
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