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

Re: Assigning Password to New created user

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: Ashish Karalkar <ashish(dot)karalkar(at)info-spectrum(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Assigning Password to New created user
Date: 2007-06-05 15:10:51
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
On Tue, 2007-06-05 at 11:34 +0530, Ashish Karalkar wrote:
> Hello All,
> I am trying to create database creation script.
> Authentication method in pg_hba.conf is set to 'Password'.
> 1) I want to create a new user and want to assign a password to it
> internally (Something like  createuser qsweb -P <password>)
> 2) When  script issue command it ask for Superuser password. is there
> any way to provide this also internally??
You can put it in a .pgpass file in your home directory :
Make sure the permissions are 0600.

Or (not recommended for security reasons) you can set and export the
environment variable PGPASSWORD.
Oliver Elphick                                          olly(at)lfix(dot)co(dot)uk
Isle of Wight                    
GPG: 1024D/A54310EA  92C8 39E7 280E 3631 3F0E  1EC0 5664 7A2F A543 10EA
   Do you want to know God?

In response to

pgsql-novice by date

Next:From: Ali, LuqmanDate: 2007-06-06 02:53:16
Subject: Installation of postgresql database as root
Previous:From: Oliveiros CristinaDate: 2007-06-05 15:00:27
Subject: Re: [SQL] JOIN

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