• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

PosgreSQL root password

clops

Basic Pleskian
Dear Parallels, dear all,

does postgresql from the paid upgrade come with some special hidden pg_hba.conf file, as editing the one in /etc/postgresql/9.1/main and reloading postgresql has absolutely no effect. We desperately need to be able to login as the user "postgres" into the database, and there seems to be no default password whatsoever :( Please help!
 
Yes, there is should be /var/lib/pgsql/data/pg_hba.conf or /var/lib/pgsql/data/postgresql.conf configuration file.
 
The solution was easy to do, but hard to spot. The problem is the following:

PLESK automatically added this line

local samegroup all password #Added by Plesk

as the very first line to the file /etc/postgresql/9.1/main/pg_hba.conf ... however, people familiar with PostgreSQL are used to the fact that this file has the first ~50 lines as text exmplaining what is to be done in there, so most people will literelly ignore the first line and not spot it at all, leaving them wondering that any changes below do not take effect.

I had to move this line added by plesk to be the third rule, effectively having the following:

# Database administrative login by Unix domain socket
local all postgres trust
local all root trust
local samegroup all password #Added by Plesk

which allows login as root as well with no password and leaves everything else ticking like charm!
 
Back
Top