Authentication - Mailing list pgsql-novice

From Thorsten Haude
Subject Authentication
Date
Msg-id 20021029203830.GE898@eumel.yoo.local
Whole thread Raw
List pgsql-novice
Hi,

I have some trouble understanding how authentication works (or why it
does not work here to be precise).

I want to code yet another web-based home inventory datebase using
PostgreSQL 7.2.1 and PHP 4.1.2. For that, I want to have two users,
the admin and the web user.

Here is an excerpt from the db creation script:
- - - Schnipp - - -
create database inventory;
\connect inventory
create user inventuser with encrypted password 'secret';
- - - Schnapp - - -
Later followed by lots of grants.

Here is an excerpt from pg_hba.conf:
- - - Schnipp - - -
local   inventory                           md5
host    inventory   127.0.0.1   255.0.0.0   md5
- - - Schnapp - - -

Here is the connect:
- - - Schnipp - - -
$connectString = "host=localhost dbname=inventory user=inventuser password=" . md5("secret");
$dbh = pg_connect($connectString);
- - - Schnapp - - -

(Any other important information? Like, duh, the error message?)
- - - Schnipp - - -
Warning: Unable to connect to PostgreSQL server: FATAL 1: Password
authentication failed for user "inventuser" in <filename> on line 3
- - - Schnapp - - -
The same happens with an unencrypted password and AUTH_TYPE
'password'.

This setup works with AUTH_TYPE 'trust'. I read all I thought is
related in the documentation (Admin Guide 4 & 7), but couldn't solve
the problem. What is wrong?


A minor point: I there an easy way to activate case sensitivity for
usernames?


Thorsten
--
Nichts ist schwerer und erfordert mehr Charakter, als sich in offenem
Gegensatz zu seiner Zeit zu befinden und zu sagen: Nein!
    - Kurt Tucholsky

pgsql-novice by date:

Previous
From: "Aarni Ruuhimäki / Megative Tmi /KYMI.com"
Date:
Subject: Re: Postgres DB on smbfs?
Next
From: "Nikh Nath"
Date:
Subject: Unable to use COPY..FROM with NULL numeric fields