Using Postgresql 9.3 on Ubuntu 14.04.4 LTS
I've been changing the /etc/postgresql/9.3/main/pg_hba.conf config file madly trying to make a change that will allow me to log in with any user remotely.
My current configuration looks like so:
host all postgres <remote-ip>/32 trust asdf asdf asdf 1 1 1-1-1-1-
This is, of course, a completely bogus config file. However, when I run
sudo service postgresql restart sudo service postgresql reload
Both commands succeed with status
[ OK ] - there are no parse errors. I have also disabled all entries that start with
local and yet I am still able to login as the postgres user.
Any attempts to log into the server remotely from the host using:
psql -c 'SELECT version()' -h pg -U postgres
psql: FATAL: password authentication failed for user "postgres" FATAL: password authentication failed for user "postgres"
I am clearly not trying to use password authentication.
SHOW hba_file; as the postgres user yeilds
hba_file -------------------------------------- /etc/postgresql/9.3/main/pg_hba.conf (1 row)
Checking the logs shows that the parse errors were happening. I have cleaned out the bogus lines, leaving
host all postgres <remote-ip>/32 trust
I am still getting a password prompt for some reason. There is nothing in the log after a failed login.