Received: from mailbox2.ucsd.edu (mailbox2.ucsd.edu [132.239.1.54]) by postgresql.org (Postfix) with ESMTP id D9DC9475896 for ; Tue, 2 Apr 2002 17:40:03 -0500 (EST) Received: from smtp.ucsd.edu (smtp-a.ucsd.edu [132.239.1.49]) by mailbox2.ucsd.edu (8.12.1/8.12.1) with ESMTP id g32Me5Wx026700 for ; Tue, 2 Apr 2002 14:40:05 -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 OAA29237 for ; Tue, 2 Apr 2002 14:40:05 -0800 (PST) Reply-To: From: "Web Administrator" To: Subject: How to create a user with password Date: Tue, 2 Apr 2002 14:40:03 -0800 Message-ID: <9D9CD511E4A9D345ABDBCD1A3EC5238F0526DF@mckenzie.AD.UCSD.EDU> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0010_01C1DA53.E2ECE040" 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 In-Reply-To: <9D9CD511E4A9D345ABDBCD1A3EC5238F055430@mckenzie.AD.UCSD.EDU> X-Archive-Number: 200204/54 X-Sequence-Number: 3943 This is a multi-part message in MIME format. ------=_NextPart_000_0010_01C1DA53.E2ECE040 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_0010_01C1DA53.E2ECE040 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 t= he following parameter:
>
> TYPE  DATABASE   = ;     IP_ADDRESS       &n= bsp;      MASK       = ;    
> AUTH_TYPE     &n= bsp;       AUTH_ARGUMENT
> Local all     &n= bsp;            &nbs= p;              = ;              =      
> password    &nbs= p;        
> host  all   &nbs= p;         127.122.122.0   &nb= sp;       255.255.255.0  
> password    &nbs= p;
>
>       Now l= ook 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 cre= ate database?(y/n) y
> Shall the new user be allowed to cre= ate more new user? (y/n) y
> password: 'dbadminpassword'
> FATAL 1: password authentication fai= led for user "postgres"
> Createuser: creation of user 'dbadmi= n' failed
>
>       If I = change the config setting to
>
> Local      =    all          &nbs= p;              = ;            trust
>
>       I can= login to template1 database and create users and
> databases, but I fail to give a pass= word to a user. Look:
>
> $su postgres
> bash$createuser dbadmin with passwor= d 'dbpassword'
>
>       Now i= t 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_0010_01C1DA53.E2ECE040--