pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Web Administrator <webadmin@ucsd-pps.ucsd.edu>
To: pgsql-admin@postgresql.org
Subject: How to create a user with password
Date: Tue, 2 Apr 2002 12:56:59 -0800
Message-ID: <9D9CD511E4A9D345ABDBCD1A3EC5238F055430@mckenzie.AD.UCSD.EDU> (raw)

Hi, all:

In the file of pg_hba.conf, I give the following parameter:

TYPE	DATABASE	IP_ADDRESS		MASK		AUTH_TYPE		AUTH_ARGUMENT
Local	all							password
host	all		127.122.122.0		255.255.255.0	password

	Now look what I got:

$su postgres
bash$psql template1
$password

 	What is the password for user 'postgres' ? How can I create one for this
user?

bash$createuser dbadmin
Shall the new user be allowed to create database?(y/n) y
Shall the new user be allowed to create more new user? (y/n) y
password: 'dbadminpassword'
FATAL 1: password authentication failed for user "postgres"
Createuser: creation of user 'dbadmin' failed

	If I change the config setting to

Local 	all					trust

	I can login to template1 database and create users and databases, but I
fail to give a password to a user. Look:

$su postgres
bash$createuser dbadmin with password 'dbpassword'

	Now it seems the 'dbpasswod' became the created user.

Anybody knows how to create password for 'postgres' ? How to create a user
with password?


--------------------------------------------

Hong Jin
h1jin@ucsd.edu

view thread (7+ messages)  latest in thread

Message-ID: <9D9CD511E4A9D345ABDBCD1A3EC5238F055430@mckenzie.AD.UCSD.EDU>
Permalink:  ../9D9CD511E4A9D345ABDBCD1A3EC5238F055430@mckenzie.AD.UCSD.EDU/
Also on:    postgresql.org/message-id/9D9CD511E4A9D345ABDBCD1A3EC5238F055430@mckenzie.AD.UCSD.EDU

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: webadmin@ucsd-pps.ucsd.edu
  Subject: Re: How to create a user with password
  In-Reply-To: <9D9CD511E4A9D345ABDBCD1A3EC5238F055430@mckenzie.AD.UCSD.EDU>
  References: <9D9CD511E4A9D345ABDBCD1A3EC5238F055430@mckenzie.AD.UCSD.EDU>

* 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