Skip to content
Databases

PostgreSQL Global Development Group PostgreSQL Database Server — Default Password

Default username and password for the PostgreSQL Global Development Group PostgreSQL Database Server: postgres / (blank). Learn how to log in and how to change the default credentials.

On a fresh Linux installation (Debian, Ubuntu, RHEL/CentOS), PostgreSQL creates the 'postgres' OS user and database superuser with no password set, and configures local connections via peer authentication. This allows full superuser access via 'sudo -u postgres psql' with no password prompt — the OS kernel validates the connecting process runs as the 'postgres' OS user. Some distributions use the 'trust' method instead, allowing any local user to connect as postgres without credentials. No password needs to be bypassed; none exists. Applies to all PostgreSQL versions 9.x through 18.x.

UsernamePasswordAccessNotes
postgres
(blank / none)
DatabasePeer (OS user matching) or trust authentication on local socket. Run as postgres OS user: sudo -u postgres psql. Change auth to scram-sha-256 in pg_hba.conf for production.

Responsible use

This database lists publicly documented default credentials so administrators can find and change them. Only use these on systems you own or are authorized to test.

Related devices