Skip to content

Instantly share code, notes, and snippets.

@aalvesjr
Created April 13, 2015 22:17
Show Gist options
  • Save aalvesjr/47f87f0ddbfab6b6a490 to your computer and use it in GitHub Desktop.
Save aalvesjr/47f87f0ddbfab6b6a490 to your computer and use it in GitHub Desktop.
psql: FATAL: Peer authentication failed for user "<qualquer usuario>"
$ psql -U <qualquer usuario> -c "SELECT NOW()"
psql: FATAL: Peer authentication failed for user "<qualquer usuario>"
se ocorreu mesmo após executar:
$ sudo sed -i -E 's/host\s*all\s*all\s*127.0.0.1\/32\s*peer/host all all 127.0.0.1\/32 md5/' /etc/postgresql/9.4/main/pg_hba.conf
subistituir todos os "peer" por "md5"
$ sudo sed -i -E 's/peer/md5/' /etc/postgresql/9.4/main/pg_hba.conf
http://stackoverflow.com/questions/18664074/getting-error-peer-authentication-failed-for-user-postgres-when-trying-to-ge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment