Tagged articles
2 articles
Page 1 of 1
Ops Development & AI Practice
Ops Development & AI Practice
Sep 25, 2025 · Databases

Master Passwordless PostgreSQL Logins: .pgpass, PGPASSWORD, and pg_hba.conf

This guide explains how to bypass interactive password prompts when using psql by configuring a per‑user .pgpass file, setting the PGPASSWORD environment variable for temporary sessions, and adjusting the server‑side pg_hba.conf file, while covering required file formats, permission settings, security trade‑offs, and best‑practice recommendations.

.pgpassDatabase SecurityPGPASSWORD
0 likes · 7 min read
Master Passwordless PostgreSQL Logins: .pgpass, PGPASSWORD, and pg_hba.conf
Raymond Ops
Raymond Ops
Dec 21, 2024 · Databases

Why Does PostgreSQL Show “FATAL: password authentication failed for user ‘postgres’” and How to Fix It?

This guide explains why a PostgreSQL connection attempt fails with “FATAL: password authentication failed for user ‘postgres’”, outlines common causes such as wrong passwords and misconfigured postgresql.conf or pg_hba.conf, and provides step‑by‑step solutions including password reset, config correction, trust authentication and environment rebuild.

Configurationpassword-authenticationpg_hba.conf
0 likes · 6 min read
Why Does PostgreSQL Show “FATAL: password authentication failed for user ‘postgres’” and How to Fix It?