Postgres password authentication issue

Shadin

I've installed PostgreSQL 9.1 and pgadmin3 on Ubuntu Server 13.10.

I configured postgresql.conf with: listen_addresses = '*'

also I configured ph_hba.conf by changed peer connections to md5

Plus I reset the password of postgres by: sudo password postgres

then restarted the service with sudo /etc/init.d/postgresql restart

after that I tried to connect to the default PostgreSQL template database:

sudo -u postgres psql template1

but login failed with this error message:

psql: FATAL:  password authentication failed for user "postgres"

then I tried to login from the pgadmin, which gave me the same error.

I've read here that it might be a password expiry dates bug PostgreSQL user can not connect to server after changing password

but I couldn't solve it coz I cannot login with psql. Does anyone now how to resolve this issue?

EDIT

ph_hba file:

local   all             postgres                                md5
local   all             all                                     md5
local   all             all                                     trust

host    all             all             127.0.0.1/32            md5
hostssl all             all             192.168.0.0/16          trust
host    all             all             192.168.0.0/16          trust

host    all             all             ::1/128                 md5
pomaxa

in your pg_hba.conf, modify

local   all             postgres                                md5

to

local   all             postgres                                trust

then you'll be able to login without password

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Postgres password authentication issue

From Dev

Postgres password authentication fails

From Dev

Postgres password authentication fails

From Java

Postgresql: password authentication failed for user "postgres"

From Dev

FATAL: password authentication failed for user "postgres"

From Dev

Ecto Postgres install error password authentication failed

From Dev

PSQL - password authentication failed for user "postgres"

From Dev

jitterbit-password authentication failed for user "postgres"

From Dev

Perl Net::SFTP::Foreign issue with password authentication

From Dev

Django Authentication issue after reseting password

From Java

FATAL: password authentication failed for user "postgres" (postgresql 11 with pgAdmin 4)

From Dev

FATAL: password authentication failed for user "postgres" Ubuntu v20.10

From Dev

Postgres - How to use psql to create a database with the -c command and password authentication?

From Dev

Java Springboot application returning password authentication failed for user "postgres"

From Dev

Redshift connection issue: FATAL: password authentication failed for user

From Dev

PostgreSQL password authentication failed for user "postgres", not the same user as specified in my app config

From Dev

Rails 5 in prod: PG::ConnectionBad: FATAL: password authentication failed for user "postgres" with Docker

From Dev

Scala/Play http authentication issue - getting user name and password from request

From Dev

Password authentication fails with complex password

From Dev

LDAP authentication password encryption

From Dev

Spring Security Password Authentication

From Java

Disable password authentication for SSH

From Dev

Disabling ssh password authentication

From Dev

Authentication with bcrypt hashed password

From Dev

OpenVPN - Password Authentication Only

From Dev

catalyst authentication query is on Password

From Dev

password based authentication for internet

From Dev

Disabling ssh password authentication

From Dev

Authentication working with partial password

Related Related

  1. 1

    Postgres password authentication issue

  2. 2

    Postgres password authentication fails

  3. 3

    Postgres password authentication fails

  4. 4

    Postgresql: password authentication failed for user "postgres"

  5. 5

    FATAL: password authentication failed for user "postgres"

  6. 6

    Ecto Postgres install error password authentication failed

  7. 7

    PSQL - password authentication failed for user "postgres"

  8. 8

    jitterbit-password authentication failed for user "postgres"

  9. 9

    Perl Net::SFTP::Foreign issue with password authentication

  10. 10

    Django Authentication issue after reseting password

  11. 11

    FATAL: password authentication failed for user "postgres" (postgresql 11 with pgAdmin 4)

  12. 12

    FATAL: password authentication failed for user "postgres" Ubuntu v20.10

  13. 13

    Postgres - How to use psql to create a database with the -c command and password authentication?

  14. 14

    Java Springboot application returning password authentication failed for user "postgres"

  15. 15

    Redshift connection issue: FATAL: password authentication failed for user

  16. 16

    PostgreSQL password authentication failed for user "postgres", not the same user as specified in my app config

  17. 17

    Rails 5 in prod: PG::ConnectionBad: FATAL: password authentication failed for user "postgres" with Docker

  18. 18

    Scala/Play http authentication issue - getting user name and password from request

  19. 19

    Password authentication fails with complex password

  20. 20

    LDAP authentication password encryption

  21. 21

    Spring Security Password Authentication

  22. 22

    Disable password authentication for SSH

  23. 23

    Disabling ssh password authentication

  24. 24

    Authentication with bcrypt hashed password

  25. 25

    OpenVPN - Password Authentication Only

  26. 26

    catalyst authentication query is on Password

  27. 27

    password based authentication for internet

  28. 28

    Disabling ssh password authentication

  29. 29

    Authentication working with partial password

HotTag

Archive