Hello all,
I'm using PostGre 6.3 on a Linux box and connecting to it via ODBC from Win98.
My pg_shadow table has the following record (example):
usename
|usesysid|usecreatedb|usetrace|usesuper|usecatupd|passwd|valuntil
--------+--------+-----------+--------+--------+---------+------+-----------
-----------------
bob | 506|f |t |f |t |smith |
There is only one table in this database, named "testtable". I created the user
bob while logged in as a super-user in the database "testdb":
CREATE USER bob WITH PASSWORD smith;
GRANT ALL TO bob ON testtable;
My pg_hba.conf has three lines (only one in effect at a time, the other two are
commented out):
#host all 123.12.34.123 255.255.255.0 trust
#host all 123.12.34.123 255.255.255.0 crypt
host all 123.12.34.123 255.255.255.0 password
My problem is this. If I use the "trust" line:
host all 123.12.34.123 255.255.255.0 trust
I can log in just fine with my ODBC driver to that database and read the table
just fine, as bob smith. However, if I change it to
host all 123.12.34.123 255.255.255.0 password
I get "database doesn't exist or authorization failed" message. I know the
table exists because I can use it in "trust" mode, and I know the username and
password I'm using is correct. From what I gather in the documentation the
"password" method with no parameters authenticates in the clear from the
pg_shadow table, which to me, is populated correctly.
What am I setting up incorrectly?
Another question, if I crypt() the passwords in pg_shadow, can I then use
host all 123.12.34.123 255.255.255.0 crypt
and still have it pull the encrypted passwords from pg_shadow?
Thank you for your guidance,
--James
============================================================================
james@dpc.net ICQ # 1585849 http://www.dpc.net/~james
Senior Software Architect, Multi-Ad Services, Inc. http://www.multi-ad.com
Web Administrator of SoundCentral http://www.soundcentral.com
Part of Web Administration team of AllianceIT http://www.allianceit.net