"IDENT authentication failed for user" on 7.2.1 but not on 7.1.3

Started by Barkerover 23 years ago3 messagesbugs
Jump to latest
#1Barker
barkerds@snybufaf.buffalostate.edu

I don't know if this is a bug with PostgreSQL or perhaps
something changed with RedHat 7.3
My application failed on RH 7.3, but worked fine on RH 7.2 & 7.1.
PostgreSQL 7.2.1 produced the following error message:
'FATAL 1: IDENT authentication failed for user "apache"'
but worked okay on PostgreSQL 7.1.3.

Two examples are provided below which demonstrate the problem:
1) NOT okay on RH 7.3, and
2) okay on RH 7.2

1. NOT OKAY ON RH 7.3
*
* $ psql --version
* psql (PostgreSQL) 7.2.1
*
* $ psql octave
* Welcome to psql, the PostgreSQL interactive terminal.
* ...
*
* octave=# \z
* Access privileges for database "octave"
* Table | Access privileges
* -------+--------------------------------
* form | {=,postgres=arwdRxt,apache=rw}
* use | {=,postgres=arwdRxt,apache=rw}
* (2 rows)
*
* octave=# \q
* $ psql -U apache octave
* psql: FATAL 1: IDENT authentication failed for user "apache"

2. OKAY ON RH 7.2
**
** $ psql --version
** psql (PostgreSQL) 7.1.3
**
** $ psql octave
** Welcome to psql, the PostgreSQL interactive terminal.
** ...
**
** octave=# \z
** Access permissions for database "octave"
** Relation | Access permissions
** ----------+-----------------------------------
** form | {"=","postgres=arwR","apache=rw"}
** use | {"=","postgres=arwR","apache=rw"}
** (2 rows)
**
** octave=# \q
** $ psql -U apache octave
** Welcome to psql, the PostgreSQL interactive terminal.
** ...

Any help will be appreciated.
Thanks,
Steve Barker
barkerds@snybufaf.buffalostate.edu
Buffalo State College

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Barker (#1)
Re: "IDENT authentication failed for user" on 7.2.1 but not on 7.1.3

Barker <barkerds@snybufaf.buffalostate.edu> writes:

I don't know if this is a bug with PostgreSQL or perhaps
something changed with RedHat 7.3
My application failed on RH 7.3, but worked fine on RH 7.2 & 7.1.
PostgreSQL 7.2.1 produced the following error message:
'FATAL 1: IDENT authentication failed for user "apache"'
but worked okay on PostgreSQL 7.1.3.

So are you running an ident server on the RH 7.3 system?

Also, I wonder about environment variables --- like PGHOST ---
not to mention whether you have comparable pg_hba.conf files
on both setups. PG 7.1 did not support IDENT auth on local
connections, so either you weren't actually running IDENT on
that 7.1 setup, or you had "PGHOST=localhost" or some other
hidden method of causing the connection to be TCP not Unix-socket.

regards, tom lane

#3Barker
barkerds@snybufaf.buffalostate.edu
In reply to: Tom Lane (#2)
Re: "IDENT authentication failed for user" on 7.2.1 but not

Thanks Tom, my problem was resolved by changing pg_hba.conf to:
local all trust

This line was provided by default in RedHat 7.2, but it is commented
out in RedHat 7.3.

This permission sounds quite liberal.
Perhaps someone can suggest a more-desirable replacement if I only
want an apache user from the internet in addition to the postgres
superuser.

Thanks,
Steve Barker

On Wed, 7 Aug 2002, Tom Lane wrote:

Show quoted text

Barker <barkerds@snybufaf.buffalostate.edu> writes:

I don't know if this is a bug with PostgreSQL or perhaps
something changed with RedHat 7.3
My application failed on RH 7.3, but worked fine on RH 7.2 & 7.1.
PostgreSQL 7.2.1 produced the following error message:
'FATAL 1: IDENT authentication failed for user "apache"'
but worked okay on PostgreSQL 7.1.3.

So are you running an ident server on the RH 7.3 system?

Also, I wonder about environment variables --- like PGHOST ---
not to mention whether you have comparable pg_hba.conf files
on both setups. PG 7.1 did not support IDENT auth on local
connections, so either you weren't actually running IDENT on
that 7.1 setup, or you had "PGHOST=localhost" or some other
hidden method of causing the connection to be TCP not Unix-socket.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org