Authentification - Mailing list pgsql-novice

From Thorsten Haude
Subject Authentification
Date
Msg-id 20021110155328.GX1408@eumel.yoo.local
Whole thread Raw
Responses Re: Authentification  (Tom Lane <tgl@sss.pgh.pa.us>)
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
--
Fear leads to anger. Anger leads to hate. Hate leads to
using Windows for mission-critical applications.

pgsql-novice by date:

Previous
From: Joel Rodrigues
Date:
Subject: Re: Display a function
Next
From: Tom Lane
Date:
Subject: Re: Authentification