PostgreSQL: access from network for custom DBs

Let’s say that NethServer is playing the “one server band” for the whole network.
Let’s say that quite packages are installed; among them, PostgreSQL is already sitting there (9.2, which is unsupported!)

How can a n00b sysadmin and dbadmin do to allow the management of the server? Maybe via pgAdmin.
Step 0: change firewall settings on service. Done.
What’s next? As stated via NethServer 6 documentation, postgres user is accessible without passowrd, but only from loopback.

(i’m going to take down some notes for transform this chat into a wiki or a “getting started”…)



Isn’t NethServer 6x EOL?

My 2 cents

But NethServer 7 is using quite the same approach. For instance, Postgre 9.2 is installed :wink:

The basic problem with all distros with extreme LTS…

A LOT of programs won’t run on RHEL / Centos 7 because of old and outdated versions. Ok, some security issues will be aleviated by Backporting, but still, a lot is no more functional…

PHP Versions, Database versions are only the top of the pile…

Like I can’t run Zabbix 5.2 on Neth…

My 2 cents

Back to PostgreSQL, please :wink:


OK, then following infos:

Suitable Web-GUIs for PGSQL Administration:

  • PHPPGadmin
  • Webmin

I’ve used both over several years, both are very usable!
Note: Webmin CAN be used easily to administrate PGSQL on NethServer, but should NOT be used to administrate eg Users or Groups. For one, NethServer uses an AD container, second, Webmin does NOT know about the e-smith templating system. Using Webmin for administrating other aspects of NethServer can severly break your system!

CLI / Applications:

In pg_hba.conf (/var/lib/pgsql/data/ or /etc/postgresql/) the folowing needs to be adapted:

local all all ident sameuser
host all all ident sameuser

change the above to the following:

local all all trust
host all all trust

To access PGSQL from a host on the local network, you need to add in the hosts address as in the localhost example above - in a new line below!

These are stuff I used a lot until about 2012-2014 (Change of ERP System / Database), and these infos come from my personal notes…
But it should still all work.

My 2 cents

1 Like