Hey Guys,

after upgrading my Kali I couldn't connect anymore to my postgresql DB with Metasploit. So first I thought to just reinstall the postgres and metasploit, so I removed both with purge and reinstalled metasploit (with postgres as dependency). Now I cannot login anymore with psql as postgres (Error: psql: FATAL: password authentication failed for user "postgres")... I changed the postgres password too and set in the pg_hba.conf everything on trust. What I noticed is that there is no config files for postgres in the /etc/ folder, so i searched for the postgres.conf file and changed the directorys, where the new config files are stored, but still I couldn't get it working.

Is there a simple way to just uninstall both metasploit and postgres and reinstall it the way Kali installs it by default?

My way was :

apt remove --purge postgresql

apt remove --purge metasploit


and then:

apt install metasploit

System Information:
4.17.0-kali1-amd64 #1 SMP Debian 4.17.8-1kali1 (2018-07-24) x86_64 GNU/Linux
Kali 2018.2


output of: locate pg_hba.conf

/opt/rapid7/nexpose/nsc/nxpgsql/nxpdata/pg_hba.conf
/opt/rapid7/nexpose/nsc/nxpgsql/pgsql/share/pg_hba.conf.sample
/root/.pg_hba.conf
/root/pg_hba.conf
/usr/share/postgresql/10/pg_hba.conf
/usr/share/postgresql/10/pg_hba.conf.sample
/var/lib/docker/overlay2/06409a6d6c7a8c4a7d607015d6f4b0eb84835d0785ec3879bb 1d5153da7802a5/diff/usr/local/share/postgresql/pg_hba.conf.sample
/var/lib/docker/overlay2/17405605ce7af89e66af73e50ce83e86abda1d55f7cb4c2650 08dcebeff587de/merged/usr/local/share/postgresql/pg_hba.conf.sample
/var/lib/docker/volumes/d00f6991924605340027910845adb0679f504670e39a867c25 b516fe1d9e064e/_data/pg_hba.conf




Thanks for helping.