ident authentication with named localhost

From: David Link <dlink(at)soundscan(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: ident authentication with named localhost
Date: 2006-05-11 21:34:29
Message-ID: 4463ADE5.10508@soundscan.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I am having trouble with ident authentication. Everything is working
fine except when specifying host for connections on the local machine.

pg_hba.conf:

local all all ident wp
host all all 10.97.8.0/24 ident wp

pg_ident.conf:

wp dlink dlink
wp dlink firstalert
wp dlink postgres
wp dlink video
wp postgres postgres
wp wwwrun firstalert
wp wwwrun video

If the db is on mach1 and the Unix user is dlink the following works

dlink(at)mach1$ psql -d mydb -U postgres
dlink(at)mach2$ psql -d mydb -U postgres -h mach1 # from remote machine

While the following does not: (nor with perl DBI)

dlink(at)mach1$ psql -d mydb -U postgres -h mach1
dlink(at)mach1$ psql -d mydb -U postgres -h localhost
dlink(at)mach1$ psql -d mydb -U postgres -h 10.97.8.244
dlink(at)mach1$ psql -d mydb -U postgres -h 127.0.0.1

If I add the following to pg_hba.conf it works of course:

host all all 10.97.8.244/32 trust

But this does not:

host all all 10.97.8.244/32 ident wp.

If I try as the postgres Unix user then it works:

postgres(at)mach1$ psql -d mydb -U postgres -h mach1

We are using:
SUSE 9 / Linux 2.6.5-7
Postgresql 8.1
And LDAP.

The problem might be due to how identd works on localhost with LDAP.
The postgres user is found in /etc/passwd, while the dlink user is not.

Incidentally, get this, on a second machine (with same software) what's
described here as not working, works intermittently. Now it worked.
Now it didn't. For dlink user. Weird.

Does anyone know how I can test ident? I can telnet 10.97.8.244 113.
The server port I know is 5432, but what's the client port to give?

Any and all help greatly appreciated.
Thanks.
David Link

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-05-11 22:13:53 Re: ident authentication with named localhost
Previous Message Nelson Guda 2006-05-11 21:13:47 shp2pgsql and pgsql2shp