Re: postgres user can connect but no one else

From: "Obe, Regina" <robe(dot)dnd(at)cityofboston(dot)gov>
To: "A B" <gentosaker(at)gmail(dot)com>, <pgsql-novice(at)postgresql(dot)org>
Subject: Re: postgres user can connect but no one else
Date: 2008-11-03 12:05:37
Message-ID: 53F9CF533E1AA14EA1F8C5C08ABC08D204F4BCE7@ZDND.DND.boston.cob
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

This is a common problem.

You should add a line at the end something like (you make want to limit
the ip range)

host all all 0.0.0.0/0 md5

You should also make sure your postgresql.conf file listen setting is
set to

listen_addresses = '*' # what IP address(es) to listen on;

and not
#listen_addresses = 'localhost' # what IP address(es) to listen
on;

Hope this helps,
Regina

-----Original Message-----
From: pgsql-novice-owner(at)postgresql(dot)org
[mailto:pgsql-novice-owner(at)postgresql(dot)org] On Behalf Of A B
Sent: Monday, November 03, 2008 5:05 AM
To: pgsql-novice(at)postgresql(dot)org
Subject: [NOVICE] postgres user can connect but no one else

I can do

# su - postgres
$ psql

and run sql commands, but running
psql
as the user I just created with the command

createuser -s -d -E -P -e myself

fails with
psql: could not connect to server: Permission denied
Is the server running locally and accepting
connections on Unix domain socket
"/var/run/postgresql/.s.PGSQL.5432"

I run psql as the "myself" user. and even psql -U myself template1
fails. (template1 was the database that always is there, right?)

pg_hba.conf says

local all all trust
host all all 127.0.0.1/32 password
host all all ::1/128 password

I'm not sure why I cant connect.

--
Sent via pgsql-novice mailing list (pgsql-novice(at)postgresql(dot)org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice
-----------------------------------------
The substance of this message, including any attachments, may be
confidential, legally privileged and/or exempt from disclosure
pursuant to Massachusetts law. It is intended
solely for the addressee. If you received this in error, please
contact the sender and delete the material from any computer.

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2008-11-03 14:41:17 Re: postgres user can connect but no one else
Previous Message A B 2008-11-03 10:04:42 postgres user can connect but no one else