pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rajiv Rajaian <rajiv.pgsql@gmail.com>
To: Vishal Arora <aroravishal22@hotmail.com>
Subject: Re: How to create a new user with password in commandline with no prompt for password
Date: Wed, 20 Feb 2008 15:49:42 +0530
Message-ID: <238696420802200219y7bfd4269u498dd1fe0b80c2cc@mail.gmail.com> (raw)
In-Reply-To: <BLU110-W177EE0CB22E47BDF4AEFA3A9230@phx.gbl>
References: <238696420802192330g69e3c447jeadd1d3d31506eda@mail.gmail.com>
	<47BBDF78.7070801@Sheeky.Biz>
	<238696420802200115m522cfd11h2f37d87845c2d6e0@mail.gmail.com>
	<BLU110-W177EE0CB22E47BDF4AEFA3A9230@phx.gbl>

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 <http://sheeky.biz/;
>
>
>
> ------------------------------
> It's about getting married. Click here! Try it!<http://ss1.richmedia.in/recurl.asp?pid=201;
>

view thread (5+ messages)  latest in thread

Message-ID: <238696420802200219y7bfd4269u498dd1fe0b80c2cc@mail.gmail.com>
Permalink:  ../238696420802200219y7bfd4269u498dd1fe0b80c2cc@mail.gmail.com/
Also on:    postgresql.org/message-id/238696420802200219y7bfd4269u498dd1fe0b80c2cc@mail.gmail.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: rajiv.pgsql@gmail.com, aroravishal22@hotmail.com
  Subject: Re: How to create a new user with password in commandline with no prompt for password
  In-Reply-To: <238696420802200219y7bfd4269u498dd1fe0b80c2cc@mail.gmail.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