Received: from mailbox3.ucsd.edu (mailbox3.ucsd.edu [132.239.1.55]) by postgresql.org (Postfix) with ESMTP id 7649D475968 for ; Tue, 2 Apr 2002 15:57:01 -0500 (EST) Received: from smtp.ucsd.edu (smtp-a.ucsd.edu [132.239.1.49]) by mailbox3.ucsd.edu (8.12.1/8.12.1) with ESMTP id g32Kv2X7026975 for ; Tue, 2 Apr 2002 12:57:02 -0800 (PST) Received: from apscsc195237 (pps-csc195-237.ucsd.edu [132.239.195.237]) by smtp.ucsd.edu (8.9.3/8.9.3) with SMTP id MAA25970 for ; Tue, 2 Apr 2002 12:57:02 -0800 (PST) Reply-To: From: "Web Administrator" To: Subject: How to create a user with password Date: Tue, 2 Apr 2002 12:56:59 -0800 Message-ID: <9D9CD511E4A9D345ABDBCD1A3EC5238F055430@mckenzie.AD.UCSD.EDU> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0000_01C1DA45.A97FAD00" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 X-Archive-Number: 200204/53 X-Sequence-Number: 3942 This is a multi-part message in MIME format. ------=_NextPart_000_0000_01C1DA45.A97FAD00 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit 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 ------=_NextPart_000_0000_01C1DA45.A97FAD00 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable How to create a user with password

Hi, all:

In the file of pg_hba.conf, I give the fol= lowing parameter:

TYPE    DATABASE  = ;      IP_ADDRESS      &n= bsp;       MASK      = ;      AUTH_TYPE     &nbs= p;         AUTH_ARGUMENT
Local   all   &n= bsp;             &nb= sp;             &nbs= p;              = ;       password     = ;          
host    all  &nb= sp;          127.122.122.0 &nb= sp;         255.255.255.0   pa= ssword       

        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 u= ser?

bash$createuser dbadmin
Shall the new user be allowed to create d= atabase?(y/n) y
Shall the new user be allowed to create m= ore new user? (y/n) y
password: 'dbadminpassword'
FATAL 1: password authentication failed f= or user "postgres"
Createuser: creation of user 'dbadmin' fa= iled

        If I change the config setting to

Local   all     &= nbsp;            &nb= sp;             &nbs= p;    trust

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

$su postgres
bash$createuser dbadmin with password 'db= password'

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

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

       =20
-----------------------= ---------------------

Hong Jin
h1jin@ucsd.edu

------=_NextPart_000_0000_01C1DA45.A97FAD00--