Skip site navigation (1) Skip section navigation (2)

Re: How to create a new user with password in commandline with no prompt for password

From: "Rajiv Rajaian" <rajiv(dot)pgsql(at)gmail(dot)com>
To: "Vishal Arora" <aroravishal22(at)hotmail(dot)com>
Subject: Re: How to create a new user with password in commandline with no prompt for password
Date: 2008-02-20 10:19:42
Message-ID: 238696420802200219y7bfd4269u498dd1fe0b80c2cc@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-adminpgsql-es-ayuda
Hi vishal

While running it as "root" user Im getting
[root(at)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(at)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(at)hotmail(dot)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(dot)pgsql(at)gmail(dot)com
> To: pgsql(at)sheeky(dot)biz
> Subject: Re: [ADMIN] How to create a new user with password in commandline
> with no prompt for password
> CC: pgsql-admin(at)postgresql(dot)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(at)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>
>

In response to

Responses

pgsql-admin by date

Next:From: ALFDate: 2008-02-20 10:35:32
Subject: Re: [Admin]Update 8.2.to 8.3
Previous:From: ioguixDate: 2008-02-20 10:05:37
Subject: Re: Actions: Edit / Delete only appears for some tables ?

pgsql-es-ayuda by date

Next:From: Rajiv RajaianDate: 2008-02-20 11:11:20
Subject: Re: How to create a new user with password in commandline with no prompt for password
Previous:From: Rajiv RajaianDate: 2008-02-20 09:15:50
Subject: Re: How to create a new user with password in commandline with no prompt for password

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group