Skip site navigation (1) Skip section navigation (2)

Authentication

From: Thorsten Haude <postgresql(at)thorstenhau(dot)de>
To: PostgreSQL Novice ML <pgsql-novice(at)postgresql(dot)org>
Subject: Authentication
Date: 2002-10-29 20:38:30
Message-ID: 20021029203830.GE898@eumel.yoo.local (view raw or flat)
Thread:
Lists: 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

Next:From: Nikh NathDate: 2002-10-30 00:31:20
Subject: Unable to use COPY..FROM with NULL numeric fields
Previous:From: Aarni Ruuhimäki / Megative Tmi / KYMI.comDate: 2002-10-29 20:22:49
Subject: Re: Postgres DB on smbfs?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group