psql: FATAL: Ident authentication failed for user "postgres" 

Joined:
04/07/2009
Posts:
135

July 09, 2010 21:24:22    Last update: July 09, 2010 21:24:22
To resolve the error:
[focus@bamboo ~]$ psql -U postgres -W
Password for user postgres: 
psql: FATAL:  Ident authentication failed for user "postgres"


Edit /var/lib/pgsql/data/pg_hba.conf, change ident to trust, then restart postgres:
# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD

# "local" is for Unix domain socket connections only
local   all         all                               trust

# IPv4 local connections:
host    all         all         127.0.0.1/32          trust
host    all         all         105.52.84.50/32       trust

# IPv6 local connections:
host    all         all         ::1/128               ident
Share |
| Comment  | Tags