views:

282

answers:

2

I have a postgresql 8.3 db set up on linux box, together with a user postgres The pg_hba.conf reads

local   all         postgres                          ident sameuser
local   all         all                               md5

so no trusted connections from local machine.

Yet when connecting via commandline with psql, no password is asked and all users get all access to all databases.

I'm completely lost here..

A: 

Try

 host   all   all   127.0.0.1/32        md5

instead.

Dirk Eddelbuettel
A: 

Are you sure you did restart or reload of PostgreSQL after pg_hba.conf change?

If yes, type this command from postgres system account (shell):

psql -qAt -c "show hba_file" | xargs grep -v -E '^[[:space:]]*#'

If this will not help - show us output of the command.

depesz
Turns out that I was looking at the wrong conf file due to a wierd mixup. Found out thanks to the show hba_file (didnt know about the command before)
Ash