Productive Linux


 Subscribe via Feedburner in a reader

Enter your email address:

Delivered by FeedBurner


Don't have an account?
Sign up to
Forgot your password?

Postgres - IDENT authentification failed
13 March 2007 @ 22:16 GMT
by Paul

One of the most annoying things is the way that postgres is first installed. IDENT authentication requires your unix and postgres identities to be the same. It's very frustrating and means we often end up with this error: FATAL: IDENT authentication failed for user


A way to fix this, at least on development machines is to tell postgres to trust all local users. In pg_hba.conf put something like this. It is apparently the "upstream" default and allows unrestricted access to any database by any user on the local machine:

# TYPE  DATABASE    USER        IP-ADDRESS        IP-MASK           METHOD
local   all         all                                             trust
# IPv4-style local connections:
host    all         all   trust

i've solved this problem by adding the following line : local all user md5 before: local all all ident sameuser

in my pg_hba.conf. I think it's more elegant and secure solution. thanks.

Posted by milo on 2011-04-19 08:22:42.

what if after changing pg_hba to md5 or trust it still tries ident auth? what could still be wrong?

Posted by gah on 2011-12-15 19:14:56.
Comments disabled