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 16:41:20 +0530
Message-ID: <238696420802200311y40a93a38jbd601e280d2fb860@mail.gmail.com> (raw)
In-Reply-To: <BLU110-W38F89600CC13EE6E9F279EA9230@phx.gbl>
References: <238696420802192330g69e3c447jeadd1d3d31506eda@mail.gmail.com>
<47BBDF78.7070801@Sheeky.Biz>
<238696420802200115m522cfd11h2f37d87845c2d6e0@mail.gmail.com>
<BLU110-W177EE0CB22E47BDF4AEFA3A9230@phx.gbl>
<238696420802200219y7bfd4269u498dd1fe0b80c2cc@mail.gmail.com>
<BLU110-W38F89600CC13EE6E9F279EA9230@phx.gbl>
Hi Vishal
Now I m able to create new user using command line
I ve created a database named 'postgres' for postgres user and I ve created
the new user in comand line
The steps I ve used
[root@g151 ~]# su postgres -c "createdb postgres"
could not change directory to "/root"
CREATE DATABASE
[root@g151 ~]# echo "CREATE USER globus WITH PASSWORD 'globus' CREATEDB;" |
psql -U postgres -d postgres
psql: FATAL: Ident authentication failed for user "postgres"
[root@g151 ~]# su postgres -c "echo \"CREATE USER globus WITH PASSWORD
'globus' CREATEDB;\" | psql -U postgres -d postgres"
could not change directory to "/root"
CREATE USER
[root@g151 ~]# su globus -c "createdb rftDatabase"
could not change directory to "/root"
CREATE DATABASE
Thanks to Vishal, Shane and pgsql-admin list
Thanks/Regards
Rajiv
Project Associate,
CARE,MIT,
Anna University
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: <238696420802200311y40a93a38jbd601e280d2fb860@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