pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedWhat is wrong with this identification configuration?
4+ messages / 2 participants
[nested] [flat]
* What is wrong with this identification configuration?
@ 2003-02-11 23:28 Wei Weng <wweng@kencast.com>
2003-02-12 01:45 ` Re: What is wrong with this identification configuration? Bruno Wolff III <bruno@wolff.to>
0 siblings, 1 reply; 4+ messages in thread
From: Wei Weng @ 2003-02-11 23:28 UTC (permalink / raw)
To: pgsql-sql
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?
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!
Wei
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: What is wrong with this identification configuration?
2003-02-11 23:28 What is wrong with this identification configuration? Wei Weng <wweng@kencast.com>
@ 2003-02-12 01:45 ` Bruno Wolff III <bruno@wolff.to>
2003-02-12 02:45 ` Re: What is wrong with this identification configuration? Wei Weng <wweng@kencast.com>
0 siblings, 1 reply; 4+ messages in thread
From: Bruno Wolff III @ 2003-02-12 01:45 UTC (permalink / raw)
To: Wei Weng <wweng@kencast.com>; +Cc: pgsql-sql
On Tue, Feb 11, 2003 at 18:28:38 -0500,
Wei Weng <wweng@kencast.com> 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.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: What is wrong with this identification configuration?
2003-02-11 23:28 What is wrong with this identification configuration? Wei Weng <wweng@kencast.com>
2003-02-12 01:45 ` Re: What is wrong with this identification configuration? Bruno Wolff III <bruno@wolff.to>
@ 2003-02-12 02:45 ` Wei Weng <wweng@kencast.com>
2003-02-12 03:46 ` Re: What is wrong with this identification configuration? Bruno Wolff III <bruno@wolff.to>
0 siblings, 1 reply; 4+ messages in thread
From: Wei Weng @ 2003-02-12 02:45 UTC (permalink / raw)
To: Bruno Wolff III <bruno@wolff.to>; +Cc: pgsql-sql
<SNIP>
> 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.
I installed PostgreSQL rpm on a fresh installed Redhat 7.3. There is no
PostgreSQL 7.1 previously installed so I don't think the pg_hba.conf I was
editing is a left-over copy.
Specifically, which part of the configuration:
local all trust
host all 127.0.0.1 255.255.255.255 trust
is wrong and should be fixed accordingly?
Thanks
Wei
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: What is wrong with this identification configuration?
2003-02-11 23:28 What is wrong with this identification configuration? Wei Weng <wweng@kencast.com>
2003-02-12 01:45 ` Re: What is wrong with this identification configuration? Bruno Wolff III <bruno@wolff.to>
2003-02-12 02:45 ` Re: What is wrong with this identification configuration? Wei Weng <wweng@kencast.com>
@ 2003-02-12 03:46 ` Bruno Wolff III <bruno@wolff.to>
0 siblings, 0 replies; 4+ messages in thread
From: Bruno Wolff III @ 2003-02-12 03:46 UTC (permalink / raw)
To: Wei Weng <wengwei@alumni.stevens-tech.edu>; +Cc: pgsql-sql
On Tue, Feb 11, 2003 at 21:45:49 -0500,
Wei Weng <wweng@kencast.com> wrote:
> <SNIP>
> > 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.
> I installed PostgreSQL rpm on a fresh installed Redhat 7.3. There is no
> PostgreSQL 7.1 previously installed so I don't think the pg_hba.conf I was
> editing is a left-over copy.
>
> Specifically, which part of the configuration:
>
>
> is wrong and should be fixed accordingly?
I think you want:
local all all trust
host all all 127.0.0.1 255.255.255.255 trust
It is possible I am wrong about when the format changed. I have been using
7.3 for a long time now. But the error message you got suggested that it
was looking for a match of connection method, database and user which is
what the newer version of the config file lists. Previously on;y connection
method and database were used.
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2003-02-12 03:46 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-02-11 23:28 What is wrong with this identification configuration? Wei Weng <wweng@kencast.com>
2003-02-12 01:45 ` Bruno Wolff III <bruno@wolff.to>
2003-02-12 02:45 ` Wei Weng <wweng@kencast.com>
2003-02-12 03:46 ` Bruno Wolff III <bruno@wolff.to>
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