Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id 12B292E0048 for ; Tue, 3 Jun 2008 07:00:29 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 12432-04 for ; Tue, 3 Jun 2008 07:00:10 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smadev.internal.net (host3.dynacom.ondsl.gr [62.103.35.211]) by developer.postgresql.org (Postfix) with ESMTP id C8FD02E004B for ; Tue, 3 Jun 2008 07:00:12 -0300 (ADT) Received: from smadev.internal.net (localhost [127.0.0.1]) by smadev.internal.net (8.14.2/8.14.2) with ESMTP id m53A04Bj037131; Tue, 3 Jun 2008 13:00:04 +0300 (EEST) (envelope-from achill@matrix.gatewaynet.com) Received: from localhost (localhost [[UNIX: localhost]]) by smadev.internal.net (8.14.2/8.14.2/Submit) id m53A03Qc037130; Tue, 3 Jun 2008 13:00:03 +0300 (EEST) (envelope-from achill@matrix.gatewaynet.com) From: Achilleas Mantzios Organization: Dynacom Tankers Mgmt To: pgsql-admin@postgresql.org Subject: Re: How add db users from shell script with their passwords? Date: Tue, 3 Jun 2008 13:00:02 +0300 User-Agent: KMail/1.9.7 Cc: "Medi Montaseri" , "=?utf-8?q?=D0=98=D0=BB=D1=8C=D1=8F?= =?utf-8?q?_=D0=A1=D0=BA=D0=BE=D1=80=D0=B8=D0=BA?=" References: <2dfe6d090806030054xba3b05bu5faf1de9c09e6929@mail.gmail.com> <8078a1730806030128n791e9c30v254e896588875468@mail.gmail.com> In-Reply-To: <8078a1730806030128n791e9c30v254e896588875468@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200806031300.03277.achill@matrix.gatewaynet.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200806/17 X-Sequence-Number: 29355 =CE=A3=CF=84=CE=B9=CF=82 Tuesday 03 June 2008 11:28:44 =CE=BF/=CE=B7 Medi M= ontaseri =CE=AD=CE=B3=CF=81=CE=B1=CF=88=CE=B5: > You can write a program in say Perl and use "create user bob with > .....options ....encrypted password xxxxx valid until xxx " which is pret= ty > much what createuser(1) does. >=20 why not just #!/bin/sh psql -c "CREATE USER foo PASSWORD 'bar'" > Cheers > Medi >=20 > On Tue, Jun 3, 2008 at 12:54 AM, =D0=98=D0=BB=D1=8C=D1=8F =D0=A1=D0=BA=D0= =BE=D1=80=D0=B8=D0=BA wrote: >=20 > > 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. > > > > -- > > -- > > =D0=A1 =D1=83=D0=B2=D0=B0=D0=B6=D0=B5=D0=BD=D0=B8=D0=B5=D0=BC, =D0=98= =D0=BB=D1=8C=D1=8F =D0=A1=D0=BA=D0=BE=D1=80=D0=B8=D0=BA > > =D1=81=D0=BF=D0=B5=D1=86=D0=B8=D0=B0=D0=BB=D0=B8=D1=81=D1=82 > > Inprint - =D0=B0=D0=B2=D1=82=D0=BE=D0=BC=D0=B0=D1=82=D0=B8=D0=B7=D0=B0= =D1=86=D0=B8=D1=8F =D0=B2=D0=B0=D1=88=D0=B5=D0=B3=D0=BE =D0=B8=D0=B7=D0=B4= =D0=B0=D1=82=D0=B5=D0=BB=D1=8C=D1=81=D1=82=D0=B2=D0=B0 > > > > 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 > > >=20 =2D-=20 Achilleas Mantzios