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

Authentification

From: Thorsten Haude <postgresql(at)thorstenhau(dot)de>
To: PostgreSQL Novice ML <pgsql-novice(at)postgresql(dot)org>
Subject: Authentification
Date: 2002-11-10 15:53:28
Message-ID: 20021110155328.GX1408@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
-- 
Fear leads to anger. Anger leads to hate. Hate leads to
using Windows for mission-critical applications.

Responses

pgsql-novice by date

Next:From: Tom LaneDate: 2002-11-10 17:49:16
Subject: Re: Authentification
Previous:From: Charlie ClarkDate: 2002-11-10 12:57:16
Subject: Question on locale settings

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