I have a fresh Azure Linux VM based on Opengeo suite. The dashboard and geoserver are working. But I can't connect or configure postgis. I follow this guide.

Via putty, logged in with the only user azure gives you (wgadmin in my case), I enter: sudo -u postgres psql postgres

and get:

could not change directory to "/home/wgadmin": Permission denied psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

PSQL - V returns 9.3.5.

I have changed the postgres users password another way. I then go on to try and modify: /etc/postgresql/9.3/main/pg_hba.conf but it doesn't seem to be present.

Am I doing something wrong?

A fresh install should be easy to configure.

3 Answers 3


I had the following message from Boundless:

After looking into this more it appears that the security on the VM image is misconfigured. I've made my team aware and they will make the change when they build the v4.9 machine (v4.9 should be out in shortly, then a few weeks after that for the new VM).

I've since managed to unlock the root password, fix the postgress user and configure the access file. But I'm getting issues starting psql. So I'm going to try something else.


Are you sure the pg_hba file is in that location. Depending on how and where it was installed from it may be in a different location. For example if the install was from enterprisedb its in the opt directory.

try runnning sudo find / -name "pg_hba.conf" to make sure the file where you think it is.

I haven't tried on azure but can you use sudo su with the wgadmin password this will allow you to navigate anywhere? Its root access and it not usually good practice to use it full time but it will allow you to see anything.


  • That file is not found. I see a sample here ./usr/pgsql-9.3/share/pg_hba.conf.sample.
    – MattPil29
    Jun 7, 2016 at 18:55
  • Logged in as postgres I try: ./pg_ctl start and get "no database directory specified and environment variable PGDATA unset"
    – MattPil29
    Jun 7, 2016 at 18:57

I ran into the same problem when trying to access the database.

The following solved the problem: sudo service postgresql-9.3 initdb sudo service postgersql-9.3 start

After that I was able to access the database with sudo -u postgres psql postgres

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.