Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 4B8F1476591 for ; Tue, 21 Jan 2003 13:40:31 -0500 (EST) Received: from proteus.affordablehost.com (unknown [216.46.203.177]) by postgresql.org (Postfix) with SMTP id 66A1D476582 for ; Tue, 21 Jan 2003 13:40:30 -0500 (EST) Received: (qmail 18782 invoked from network); 21 Jan 2003 18:42:09 -0000 Received: from unknown (HELO e-greek.net) (66.92.74.97) by 216.46.203.177 with SMTP; 21 Jan 2003 18:42:09 -0000 Message-ID: <3E2D9420.4010908@e-greek.net> Date: Tue, 21 Jan 2003 13:40:32 -0500 From: Andrew Biagioni User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020826 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Zhiqiang Feng Cc: "Leland F. Jackson, CPA" , pgsql-admin@postgresql.org Subject: Re: Stalled post to pgsql-admin References: <4.1.20030120134947.00a714e0@purds.st-andrews.ac.uk> <4.1.20030121150315.00a76750@purds.st-andrews.ac.uk> Content-Type: multipart/alternative; boundary="------------030308030302070006020300" X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/234 X-Sequence-Number: 7076 --------------030308030302070006020300 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Be careful with your pg_hba.conf entries (read the comments in the file itself, they are lengthy but useful). What you configured (below) will allow anyone to connect to your database from any machine without validation, as long as their IP address has the first two blocks equal to your machine. Are you sure that's what you want? Zhiqiang Feng wrote: >Thank Leland and Andrews for your help. > >I successfully use pgaccess to add users and now can start postgresql as a >normal user. > >However, it seems pgaccess requires TCP/IP port connection so I have to >include >host all IP_address_of_pc 255.255.0.0 trust > >in the pg_hba.conf. > >With regards, > >Zhiqiang > >At 21:18 20/01/03 -0600, Leland F. Jackson, CPA wrote: > > >>Hi Zhiqiang, >> >>You might take a look at the following link: >> >>http://www.tek-tips.com/viewthread.cfm?SQID=449717&SPID=699&page=1 >> >>After you have postgres user properly setup, you can use pgaccess to >>configure other users. >> >>LelandJ >> >> >>----- Original Message ----- >>From: "Zhiqiang Feng" >>To: >>Sent: Monday, January 20, 2003 7:52 AM >>Subject: Re: [ADMIN] Stalled post to pgsql-admin >> >> >> >> >>>Hello all, >>> >>>I am new to postgreSQL. I have installed postgreSQL 7.1.3-2 on Linux 7.2. >>>If I login as root (administrator) and change user as postgres I can >>> >>> >>create >> >> >>>database on /usr/local/pgsql/data which I created and changed its owner as >>>postgres. >>> >>>root# mkdir usr/local/pgsql/data >>>root# chown postgres /usr/local/pgsql/data >>>root# su postgres >>>bash-2.3# initdb -D /usr/local/pgsql/data >>>bash-2.3# postmaster -D /usr/local/pgsql/data > logfile 2 >&1 & >>>bash-2.3# createdb testdb >>>bash-2.3# psql testdb >>> >>>However, when I login as a normal linux user I cannot create database. So >>>it is a user management problem. >>> >>>zf2linux# createdb mydb >>>FATAL 1: user 'zf2linux' does not exist >>> >>>I have tried to create a user of zf2linux in postgreSQL but the error >>> >>> >>still >> >> >>>occurs. >>>If I try to change to postgres from zf1linux it asks for password. >>> >>>zf2linux# su postgres >>>password: ****** >>>incorrect password. >>> >>>My pg_hba.conf is left as the default format: >>> >>>local all trust >>>host all 127.0.0.1 255.255.255.255 trust >>> >>>I must miss something before I allow other users to access the postgreSQL >>>server and account. Could you please help me with the problem? >>> >>>Thanks for your attention and will sum. >>> >>>Geoff >>> >>>Dr. Zhiqiang Feng >>>School of Geography & Geosciences >>>Irving Building >>>University of St Andrews >>>St Andrews Fife KY16 9AL >>>tel: 01334 463951 >>> >>>zf2@st-andrews.ac.uk >>> >>> >>>---------------------------(end of broadcast)--------------------------- >>>TIP 3: if posting/reading through Usenet, please send an appropriate >>>subscribe-nomail command to majordomo@postgresql.org so that your >>>message can get through to the mailing list cleanly >>> >>> >>---------------------------(end of broadcast)--------------------------- >>TIP 5: Have you checked our extensive FAQ? >> >>http://www.postgresql.org/users-lounge/docs/faq.html >> >> > >Dr. Zhiqiang Feng >School of Geography & Geosciences >Irving Building >University of St Andrews >St Andrews Fife KY16 9AL >tel: 01334 463951 > >zf2@st-andrews.ac.uk > > > > > --------------030308030302070006020300 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Be careful with your pg_hba.conf entries (read the comments in the file itself, they are lengthy but useful).  What you configured (below) will allow anyone to connect to your database from any machine without validation, as long as their IP address has the first two blocks equal to your machine.  Are you sure that's what you want?

Zhiqiang Feng wrote:
Thank Leland and Andrews for your help. 

I successfully use pgaccess to add users and now can start postgresql as a
normal user. 

However, it seems pgaccess requires TCP/IP port connection so I have to
include 
host 		 all	IP_address_of_pc 	255.255.0.0		trust

in the pg_hba.conf.

With regards,

Zhiqiang

At 21:18 20/01/03 -0600, Leland F. Jackson, CPA wrote:
  
Hi Zhiqiang,

You might take a look at the following link:

http://www.tek-tips.com/viewthread.cfm?SQID=449717&SPID=699&page=1

After you have postgres user properly setup, you can use pgaccess to
configure other users.

LelandJ


----- Original Message -----
From: "Zhiqiang Feng" <zf2@st-andrews.ac.uk>
To: <pgsql-admin@postgresql.org>
Sent: Monday, January 20, 2003 7:52 AM
Subject: Re: [ADMIN] Stalled post to pgsql-admin


    
Hello all,

I am new to postgreSQL. I have installed postgreSQL 7.1.3-2 on Linux 7.2.
If I login as root (administrator) and change user as postgres I can
      
create
    
database on /usr/local/pgsql/data which I created and changed its owner as
postgres.

root# mkdir usr/local/pgsql/data
root# chown postgres /usr/local/pgsql/data
root# su postgres
bash-2.3# initdb -D /usr/local/pgsql/data
bash-2.3# postmaster -D /usr/local/pgsql/data > logfile 2 >&1 &
bash-2.3# createdb testdb
bash-2.3# psql testdb

However, when I login as a normal linux user I cannot create database. So
it is a user management problem.

zf2linux# createdb mydb
FATAL 1: user 'zf2linux' does not exist

I have tried to create a user of zf2linux in postgreSQL but the error
      
still
    
occurs.
If I try to change to postgres from zf1linux it asks for password.

zf2linux# su postgres
password: ******
incorrect password.

My pg_hba.conf is left as the default format:

local all trust
host all 127.0.0.1 255.255.255.255 trust

I must miss something before I allow other users to access the postgreSQL
server and account. Could you please help me with the problem?

Thanks for your attention and will sum.

Geoff

Dr. Zhiqiang Feng
School of Geography & Geosciences
Irving Building
University of St Andrews
St Andrews Fife KY16 9AL
tel: 01334 463951

zf2@st-andrews.ac.uk


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly
      
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html
    

Dr. Zhiqiang Feng
School of Geography & Geosciences
Irving Building
University of St Andrews
St Andrews Fife KY16 9AL
tel: 01334 463951 

zf2@st-andrews.ac.uk



  


--------------030308030302070006020300--