Article ID: 116324, created on Jun 21, 2013, last review on May 11, 2014

  • Applies to:
  • Plesk for Linux/Unix


Attempt to access PostgreSQL database using network connection to "localhost:5432" fails:

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


By default PostgreSQL is configured to authenticate network connections using ident service, which is deprecated.


Edit pg_hba.conf file (/var/lib/pgsql/data/pg_hba.conf on RHEL/CentOS and /var/lib/postgresql/9.1/main/pg_hba.conf on Debian/Ubuntu) and change authentication configuration of host type, replacing ident with password:

host all all password
host all all ::1/128 password

Create new line in same format for any external host:

host all all password

Then, restart PostgreSQL service:

/etc/init.d/postgresql restart

29d1e90fd304f01e6420fbe60f66f838 56797cefb1efc9130f7c48a7d1db0f0c a914db3fdc7a53ddcfd1b2db8f5a1b9c

Email subscription for changes to this article
Save as PDF