[plug] database authentication
Craig Ringer
craig at postnewspapers.com.au
Mon Jul 22 13:25:30 WST 2002
sol wrote:
> Hi there,
>
> Are there any database (esp. PostgreSQL) people out there? I'm having
> trouble doing something really simple with my Postgresql 7.2 db. I'm
> trying to plug (no pun intended) the database into other applications
> using unix-odbc but just can't get it right. But it's definitely
> something to do with the way I've established users in Postgres, not the
> config settings for unix-odbc.
Heh. Ran into this one a couple of months ago and spent some time
banging my head against a wall. Somewhere in the UNIX-ODBC docs (I
think) it says "unix-odbc does not support crypt passwords".
So in hba.conf you need to make sure that any db's and users you want to
be able to work with under unix-odbc need to use plaintext passwords or
some other auth scheme than crypt, like "peer sameuser" for local where
unix username == postgresql username.
---- pg_hba.conf excerpt --
# UNIXODBC doesn't support crypt so we use unenctrypted loopback conns
# for select databases
host dsmail 127.0.0.1 255.0.0.0 password
host craig 127.0.0.1 255.0.0.0 password
---- end excerpt ---
forces use of plaintext passwords on the loopback interface only where
'ident sameuser' is not useable. I seem to remember that unix-odbc
doesn't support auth with postgres using "peer sameuser" either but I'm
not sure about that, its been a while since I messed with it. Anyway
this should take care of the problem.
--
Craig Ringer
GPG Key Fingerprint: AF1C ABFE 7E64 E9C8 FC27 C16E D3CE CDC0 0E93 380D
-- if it ain't broke, add features 'till it is. (or:)
while (! broken) { features ++ ; broken = isBroken(features) }
More information about the plug
mailing list