Skip to content

Conversation

@xar
Copy link
Owner

@xar xar commented Jun 28, 2025

Fixes #46

The issue was caused by using peer authentication during initial setup, which requires the system user to match the PostgreSQL user. When running as 'samo' but trying to connect as 'postgres', peer authentication would fail.

Changes:

  • Use 'trust' authentication during initdb instead of 'peer'
  • Switch to 'md5' authentication for local connections in pg_hba.conf
  • Add proper postgres superuser password setup during initial creation

This resolves the "Peer authentication failed for user 'postgres'" error and allows successful database and user creation.

Generated with Claude Code

The issue was caused by using peer authentication during initial setup, which
requires the system user to match the PostgreSQL user. When running as 'samo'
but trying to connect as 'postgres', peer authentication would fail.

Changes:
- Use 'trust' authentication during initdb instead of 'peer'
- Switch to 'md5' authentication for local connections in pg_hba.conf
- Add proper postgres superuser password setup during initial creation

This resolves the "Peer authentication failed for user 'postgres'" error
and allows successful database and user creation.

Fixes #46

Co-authored-by: Samuel <xar@users.noreply.github.com>
@xar xar merged commit ed71769 into main Jun 28, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

still cannot create default user & password

2 participants