Thursday, September 06, 2007

psql: FATAL: IDENT authentication failed for user

Everytime I log in using normal user, I got this message:

$ psql -U gateadmin template1
psql: FATAL: IDENT authentication failed for user "gateadmin"

Why?

It looks like you would rather use password authentication than the
default IDENT-based auth (it's default in Debian distro of postgres
anyway). IDENT will only let you in when you do *not* use -U, ie,
your postgres user name is the same as your Unix user name. Change
this in pg_hba.conf, and don't forget to SIGHUP or restart the
postmaster afterwards.

regards, tom lane

Solution:

Just modify pg_hba.conf like this (change to trust)

local all trust
host all 127.0.0.1 255.255.255.255 trust

No comments: