Article ID: 116324, created on Jun 21, 2013, last review on Oct 25, 2016

  • Applies to:
  • Plesk for Linux/Unix

Symptoms

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

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

Cause

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

Workaround

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 127.0.0.1/32 password
host all all ::1/128 password

Create new line in same format for any external host:

host all all 10.1.2.3/32 password

Then, restart PostgreSQL service:

/etc/init.d/postgresql restart

29d1e90fd304f01e6420fbe60f66f838 56797cefb1efc9130f7c48a7d1db0f0c a914db3fdc7a53ddcfd1b2db8f5a1b9c

Email subscription for changes to this article
Save as PDF