Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 75B092E004B for ; Wed, 20 Feb 2008 06:20:02 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 31172-05 for ; Wed, 20 Feb 2008 06:19:47 -0400 (AST) Received: from rv-out-0910.google.com (rv-out-0910.google.com [209.85.198.184]) by postgresql.org (Postfix) with ESMTP id 4FB6C2E0044 for ; Wed, 20 Feb 2008 06:19:47 -0400 (AST) Received: by rv-out-0910.google.com with SMTP id g13so2001742rvb.43 for ; Wed, 20 Feb 2008 02:19:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=lPtxodGhiG/BCcqKYDL8pdstmZStyVRf1oB2K+v7dJs=; b=B7DXo9cDwBaG8ZgAqwKZRmu4lwLCJqMUcFnI9WHX71cscuwaeULEV253H0Jix/IqrQScQmckKwEmlxS7f70Ov8YuJJchfQEZC24kzFFRSy9Y/tCO1YWEHPgjQYYrd1g2JGvJKHUTEiwtOlcDW3qodHUWvrA+S48KtQLnHTafRKE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=EE1qu4B+lUHtKpwGekoZA0xeCw1s9Tk7AIOqt/uJfaLqrbDn5R1THu+i0NX6Tn9vxwFFL8nPCedyLIDejWtuuYYmGoqlPeYLI4YW9mdGffSShuyL0TJ2Z8Rxqp7j/AZNHW89b+4wfsBz5c8zPrkII0+8czPZmSo53yyYi+S8WPA= Received: by 10.140.251.1 with SMTP id y1mr5587135rvh.11.1203502782214; Wed, 20 Feb 2008 02:19:42 -0800 (PST) Received: by 10.141.152.4 with HTTP; Wed, 20 Feb 2008 02:19:42 -0800 (PST) Message-ID: <238696420802200219y7bfd4269u498dd1fe0b80c2cc@mail.gmail.com> Date: Wed, 20 Feb 2008 15:49:42 +0530 From: "Rajiv Rajaian" To: "Vishal Arora" Subject: Re: How to create a new user with password in commandline with no prompt for password In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_6080_18429361.1203502782201" References: <238696420802192330g69e3c447jeadd1d3d31506eda@mail.gmail.com> <47BBDF78.7070801@Sheeky.Biz> <238696420802200115m522cfd11h2f37d87845c2d6e0@mail.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200802/229 X-Sequence-Number: 28303 ------=_Part_6080_18429361.1203502782201 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi vishal While running it as "root" user Im getting [root@g151 ~]# echo "CREATE ROLE globus WITH PASSWORD 'globus' CREATEDB;" | psql -U postgres psql: FATAL: Ident authentication failed for user "postgres" Also with "postgres" user getting the same error [postgres@g151 ~]$ echo "CREATE ROLE globus WITH PASSWORD 'globus' CREATEDB;" | psql -U postgres psql: FATAL: database "postgres" does not exist On Feb 20, 2008 3:43 PM, Vishal Arora wrote: > > you have to be Postgres Super user to use this command. and instead of > CREATE USER - use CREATE ROLE... > > > ------------------------------ > Date: Wed, 20 Feb 2008 14:45:50 +0530 > From: rajiv.pgsql@gmail.com > To: pgsql@sheeky.biz > Subject: Re: [ADMIN] How to create a new user with password in commandline > with no prompt for password > CC: pgsql-admin@postgresql.org > > > Hi Shane > Thanks for u r suggestions > I tried to create user with the following command ..Im getting > authentication error for postgres user > > [root@g151~]# echo "CREATE USER globus WITH PASSWORD 'globus' CREATEDB;" | > psql -U postgres > psql: FATAL: IDENT authentication failed for user "postgres" > > > > Get Sheeky @ http://Sheeky.Biz > > > > ------------------------------ > It's about getting married. Click here! Try it! > ------=_Part_6080_18429361.1203502782201 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi vishal

While running it as "root" user Im getting
[root@g151 ~]# echo "CREATE ROLE globus WITH PASSWORD 'globus' CREATEDB;" | psql -U postgres
psql: FATAL:  Ident authentication failed for user "postgres"

Also with "postgres" user getting the same error

[postgres@g151 ~]$  echo "CREATE ROLE globus WITH PASSWORD 'globus' CREATEDB;" | psql -U postgres
psql: FATAL:  database "postgres" does not exist


On Feb 20, 2008 3:43 PM, Vishal Arora <aroravishal22@hotmail.com> wrote:

you have to be Postgres Super user to use this command. and instead of CREATE USER - use CREATE ROLE...



Date: Wed, 20 Feb 2008 14:45:50 +0530
From: rajiv.pgsql@gmail.com
To: pgsql@sheeky.biz
Subject: Re: [ADMIN] How to create a new user with password in commandline with no prompt for password
CC: pgsql-admin@postgresql.org


Hi Shane
Thanks for u r suggestions
I tried to create user with the following command ..Im getting authentication error for postgres user

[root@g151~]# echo "CREATE USER globus WITH PASSWORD 'globus' CREATEDB;" | psql -U postgres
psql: FATAL:  IDENT authentication failed for user "postgres"



Get Sheeky @ http://Sheeky.Biz



It's about getting married. Click here! Try it!

------=_Part_6080_18429361.1203502782201--