psql: FATAL: password authentication failed for user "postgres"
0
votes
2
answers
83049
views
I am running
postgresql-9.6
on Rhel7
. I know that the default/root user doesnt have a password, however i will like to use phpPgAdmin
to do my work. the problem is I have edited my pg_hba.conf
file to look as follow, (based on various documentation I have read so far:
local all all password
# IPv4 local connections:
host all all 127.0.0.1/32 password
# IPv6 local connections:
host all all ::1/128 ident
The only problem is that after this configuration even the default user postgres
has lost access completely. When I try to log in as the root user with psql
and and enter my computer's root user's password
this is what what happens:
-bash-4.2$ psql
Password:
psql: FATAL: password authentication failed for user "postgres"
but when I change the above configuration on the pg_hba.conf
file to:
peer
ident
ident
I can log in as root however phpPgAdmin
won't let me in without a password.
Asked by christian Martin
(29 rep)
Sep 18, 2018, 12:25 AM
Last activity: Aug 26, 2021, 12:20 AM
Last activity: Aug 26, 2021, 12:20 AM