Do not prompt password and enable remote access

Do not prompt password

Edit the file /etc/postgresql/9.3/main/pg_hba.conf and change the value from peer to trust:

1
2
3
4
5
# "local" is for Unix domain socket connections only
local   all             postgres                                trust

# IPv4 local connections:
host    all             all             0.0.0.0/0            trust

Restart the PostgreSQL service:

1
sudo service postgresql restart

Enable remote access

Edit the file /etc/postgresql/9.3/main/postgresql.confand look for the property listen_addresses and change its value to '*':

1
listen_addresses = '*'

Restart the PostgreSQL service:

1
sudo service postgresql restart