X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id EE59C475843 for ; Tue, 11 Feb 2003 20:32:01 -0500 (EST) Received: from wolff.to (wolff.to [66.93.249.74]) by postgresql.org (Postfix) with SMTP id 31F95474E44 for ; Tue, 11 Feb 2003 20:32:01 -0500 (EST) Received: (qmail 6208 invoked by uid 500); 12 Feb 2003 01:45:24 -0000 Date: Tue, 11 Feb 2003 19:45:24 -0600 From: Bruno Wolff III To: Wei Weng Cc: pgsql-sql@postgresql.org Subject: Re: What is wrong with this identification configuration? Message-ID: <20030212014524.GB5831@wolff.to> Mail-Followup-To: Wei Weng , pgsql-sql@postgresql.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.25i X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/230 X-Sequence-Number: 11628 On Tue, Feb 11, 2003 at 18:28:38 -0500, Wei Weng wrote: > This is the idenfication setup in my /var/lib/pgsql/data/pg_hba.conf > > local all trust > host all 127.0.0.1 255.255.255.255 trust > > This is supposed to authenticate any user to be able to access my > postgresql system any time, no? Well, the authentication method is trust so you are letting any local user connect to the database as any user. If this isn't what you wanted, look into using ident authentication. > > But this is what happened ( I tried to "log in" the template1 database > with root, postgres system account and my own user account) > > [root@Monet wweng]# su postgres > bash-2.05a$ psql template1 > psql: FATAL 1: No pg_hba.conf entry for host localhost, user postgres, > database template1 > > bash-2.05a$ exit > [root@Monet wweng]# psql template1 > > psql: FATAL 1: No pg_hba.conf entry for host localhost, user root, > database template1 > > [root@Monet wweng]# exit > [wweng@Monet wweng]$ psql template1 > psql: FATAL 1: No pg_hba.conf entry for host localhost, user wweng, > database template1 > > Why is this happening? And how can I log in the template1 database? > > I am using postgresql 7.2.3 on Redhat 7.3. > > bash-2.05a$ rpm -qa | grep postgresql > postgresql-7.2.3-5.73 > postgresql-libs-7.2.3-5.73 > postgresql-server-7.2.3-5.73 > postgresql-devel-7.2.3-5.73 > > Thanks a lot! The format of the hba.conf file changed between 7.1 and 7.2. It looks like you are using an old one. After the database field, there is now a user field. To get the same effect as before, use 'all' for the user.