pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pg_hba.conf
3+ messages / 3 participants
[nested] [flat]

* pg_hba.conf
@ 1999-03-28 19:46 Antonello De Santis <ua01020@flashnet.it>
  1999-03-28 22:55 ` Re: [INTERFACES] pg_hba.conf Bob VonMoss <bvonmoss@bigfoot.com>
  1999-03-29 00:08 ` Re: [INTERFACES] pg_hba.conf Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 2 replies; 3+ messages in thread

From: Antonello De Santis @ 1999-03-28 19:46 UTC (permalink / raw)
  To: pgsql-interfaces

Hi again,

I need help to set up the config file pg_hba.conf..... The problem is that the
database only accepts connections coming from a local unix socket and not from
a valid tcp/ip address.
My pg_hba.conf file looks like this:

local        all					trust
host         all         192.168.1.0     255.255.255.0    trust

I have a local network made up of two machines whose addresses are 192.168.1.1
and 192.168.1.2, so I tell to accept every request coming from the local
network. If I comment out the first line, relative to unix socket, and restart
postgresql, when I try to access a database I get an error message "user
authentication failed". Why's that? I think I start the postmaster in the right
way, that is, specifying the -i option:

case "$1" in
  start)
	echo -n "Starting postgresql service: "
	su postgres -c '/usr/bin/postmaster -i -S -D/var/lib/pgsql'
	sleep 1
	pid=`pidof postmaster`
	echo -n "postmaster [$pid]"
	touch /var/lock/subsys/postmaster
	echo
	;;

Thank you for your help.
Greetings,

  Antonello De Santis




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: [INTERFACES] pg_hba.conf
  1999-03-28 19:46 pg_hba.conf Antonello De Santis <ua01020@flashnet.it>
@ 1999-03-28 22:55 ` Bob VonMoss <bvonmoss@bigfoot.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Bob VonMoss @ 1999-03-28 22:55 UTC (permalink / raw)
  To: pgsql-interfaces

Antonello De Santis wrote:

> I need help to set up the config file pg_hba.conf..... The problem is that the
> database only accepts connections coming from a local unix socket and not from
> a valid tcp/ip address.
> My pg_hba.conf file looks like this:
>
> local        all                                        trust
> host         all         192.168.1.0     255.255.255.0    trust

I had the "User Authenication Error" messages trying to manipulate settings in that
file. It didn't work until the admin ran pg_passwd and set a password. No problems
since.

--
Bob VonMoss
mailto:bvonmoss@bigfoot.com
from Chicago, IL





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: [INTERFACES] pg_hba.conf
  1999-03-28 19:46 pg_hba.conf Antonello De Santis <ua01020@flashnet.it>
@ 1999-03-29 00:08 ` Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 3+ messages in thread

From: Tom Lane @ 1999-03-29 00:08 UTC (permalink / raw)
  To: ua01020@flashnet.it; +Cc: pgsql-interfaces

Antonello De Santis <ua01020@flashnet.it> writes:
> My pg_hba.conf file looks like this:
> local        all					trust
> host         all         192.168.1.0     255.255.255.0    trust

That's OK as far as it goes, and I imagine that connections from your
other machine will work.  But for TCP connections from the same machine
the postmaster is on, you *also* need

host         all         127.0.0.1     255.255.255.255   trust

because local TCP connections usually go via the standard "loopback
address" 127.0.0.1, not via any external IP address your machine may
have.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~1999-03-29 00:08 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-03-28 19:46 pg_hba.conf Antonello De Santis <ua01020@flashnet.it>
1999-03-28 22:55 ` Bob VonMoss <bvonmoss@bigfoot.com>
1999-03-29 00:08 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox