Authentification

From: tillea(at)rki(dot)de
To:
Cc: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Authentification
Date: 2001-06-21 09:13:33
Message-ID: Pine.LNX.4.33.0106211030380.29212-100000@wr-linux02.rki.ivbb.bund.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

I´m using PostgreSQL 7.1.2 (from Debian). My pg_hba.conf looks like

# default
local all peer sameuser
host all 127.0.0.1 255.0.0.0 ident sameuser
# added myself to cope with the problem
host all 127.0.0.1 255.0.0.0 crypt

To check, whether users can connect via crypt method I wrote a small
python script:

#!/usr/bin/python

def hello():
import sys
from pg import DB
conn = DB('test',user='testuser',passwd='test')
x = conn.query("SELECT * from testtable")
return x

print hello()

/var/log/postgresql.log shows:
Peer authentication failed for user 'testuser'

I can correctly log in on the Linux system with the testuser account
and the script works if I run it from this account *and* deleting
the passwd option from the connection string - but that´s the ident
authenification method. With password option the connection can not
be established.

Moreover I have read the postgresql docs especially auth-methods.html.

I tried to alter the pg_shadow password using

test=# alter user testuser with password 'test' ;

but I´m not sure if this works because of the strange sounding
paragraph in auth-methods.html:

Note that using alternative passwords like this means that one can no
longer use ALTER USER to change one's password. It will still appear
to work but the password one is actually changing is not the password
that the system will end up using.

I also gave those alternate passwords a try and did

/usr/lib/postgresql/bin/pg_passwd /etc/postgresql/passwd
Username: testuser
New password:
Re-enter new password:

and changed the pg_hba.conf line to

host all 127.0.0.1 255.0.0.0 crypt passwd

But nothing changed.

Can anybody help me out this trouble?

Kind regards

Andreas.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Moses 2001-06-21 09:20:38 Postgresql for win2k
Previous Message Richard Huxton 2001-06-21 08:53:47 Re: Hardware Config