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

* pg_hba.conf question
@ 2001-01-29 11:10 Graham Vickrage <graham@digitalplanit.com>
  2001-01-29 15:07 ` Re: pg_hba.conf question Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 5+ messages in thread

From: Graham Vickrage @ 2001-01-29 11:10 UTC (permalink / raw)
  To: pgsql-admin

I am trying to run an insert script via a contrab job on linux. I am having
problems figuring out the security. What I need is for the local setting to
allow a connection as the same unix user I am logged in as i.e. postgres.

I noticed that you can't use the 'ident sameuser' with local unix sockets,
what is the method of getting round this as I cant use trust for this
database?

Thanks

Graham

Attachments:

  winmail.dat (application/ms-tnef, 1.6K) download

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

* Re: pg_hba.conf question
  2001-01-29 11:10 pg_hba.conf question Graham Vickrage <graham@digitalplanit.com>
@ 2001-01-29 15:07 ` Tom Lane <tgl@sss.pgh.pa.us>
  2001-01-29 18:13   ` RE: pg_hba.conf question Graham Vickrage <graham@digitalplanit.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Tom Lane @ 2001-01-29 15:07 UTC (permalink / raw)
  To: Graham Vickrage <graham@digitalplanit.com>; +Cc: pgsql-admin

"Graham Vickrage" <graham@digitalplanit.com> writes:
> I noticed that you can't use the 'ident sameuser' with local unix sockets,
> what is the method of getting round this as I cant use trust for this
> database?

ident only works with TCP sockets.  You could require people to connect
to host localhost, ie, use a local TCP connection instead of a Unix
socket.  Set up 127.0.0.1 as ident sameuser and socket connections as
reject in pg_hba.conf.

			regards, tom lane



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

* RE: pg_hba.conf question
  2001-01-29 11:10 pg_hba.conf question Graham Vickrage <graham@digitalplanit.com>
  2001-01-29 15:07 ` Re: pg_hba.conf question Tom Lane <tgl@sss.pgh.pa.us>
@ 2001-01-29 18:13   ` Graham Vickrage <graham@digitalplanit.com>
  2001-01-29 18:26     ` Re: pg_hba.conf question Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 5+ messages in thread

From: Graham Vickrage @ 2001-01-29 18:13 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin

I have tried entering the following as suggested: -
local        all                                               reject
host         all         127.0.0.1           255.255.255.0	   ident
sameuser

I have also tried
local        all                                               reject
host         all         127.0.0.1           255.255.255.0     trust

After trying the usual command %psql dbname to connect I keep getting the
message
No pg_hba.conf entry for host localhost, user postgres, database dbname

Is there something obvious I am missing????

Thanks

Graham

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: 29 January 2001 15:08
To: Graham Vickrage
Cc: Postgres Admin
Subject: Re: [ADMIN] pg_hba.conf question


"Graham Vickrage" <graham@digitalplanit.com> writes:
> I noticed that you can't use the 'ident sameuser' with local unix sockets,
> what is the method of getting round this as I cant use trust for this
> database?

ident only works with TCP sockets.  You could require people to connect
to host localhost, ie, use a local TCP connection instead of a Unix
socket.  Set up 127.0.0.1 as ident sameuser and socket connections as
reject in pg_hba.conf.

			regards, tom lane




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

* Re: pg_hba.conf question
  2001-01-29 11:10 pg_hba.conf question Graham Vickrage <graham@digitalplanit.com>
  2001-01-29 15:07 ` Re: pg_hba.conf question Tom Lane <tgl@sss.pgh.pa.us>
  2001-01-29 18:13   ` RE: pg_hba.conf question Graham Vickrage <graham@digitalplanit.com>
@ 2001-01-29 18:26     ` Tom Lane <tgl@sss.pgh.pa.us>
  2001-01-30 06:35       ` Re: pg_hba.conf question Milind Patil <milind@bombay.retortsoft.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Tom Lane @ 2001-01-29 18:26 UTC (permalink / raw)
  To: Graham Vickrage <graham@digitalplanit.com>; +Cc: pgsql-admin

"Graham Vickrage" <graham@digitalplanit.com> writes:
> After trying the usual command %psql dbname to connect I keep getting the
> message
> No pg_hba.conf entry for host localhost, user postgres, database dbname

Looks to me like you're trying to connect via Unix-socket.  Try
specifying PGHOST=localhost at the client.

			regards, tom lane



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

* Re: pg_hba.conf question
  2001-01-29 11:10 pg_hba.conf question Graham Vickrage <graham@digitalplanit.com>
  2001-01-29 15:07 ` Re: pg_hba.conf question Tom Lane <tgl@sss.pgh.pa.us>
  2001-01-29 18:13   ` RE: pg_hba.conf question Graham Vickrage <graham@digitalplanit.com>
  2001-01-29 18:26     ` Re: pg_hba.conf question Tom Lane <tgl@sss.pgh.pa.us>
@ 2001-01-30 06:35       ` Milind Patil <milind@bombay.retortsoft.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Milind Patil @ 2001-01-30 06:35 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Graham Vickrage <graham@digitalplanit.com>; pgsql-admin



On Mon, 29 Jan 2001, Tom Lane wrote:

> "Graham Vickrage" <graham@digitalplanit.com> writes:
> > After trying the usual command %psql dbname to connect I keep getting the
> > message
> > No pg_hba.conf entry for host localhost, user postgres, database dbname
> 
> Looks to me like you're trying to connect via Unix-socket.  Try
> specifying PGHOST=localhost at the client.
> 
> 			regards, tom lane
> 
> 

Well , it seems Ur editing wrong file.

If Ur working on postgres 6.5 edit the file pg_hba.conf file in pgsql dir

however if Ur working on postgres 7 edit file pg_hba.conf file in
pgsq/data dir and locate other pg_hba.conf file if exists and rename them.

Check this out.

Regrds,

Milind.




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


end of thread, other threads:[~2001-01-30 06:35 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-01-29 11:10 pg_hba.conf question Graham Vickrage <graham@digitalplanit.com>
2001-01-29 15:07 ` Tom Lane <tgl@sss.pgh.pa.us>
2001-01-29 18:13   ` Graham Vickrage <graham@digitalplanit.com>
2001-01-29 18:26     ` Tom Lane <tgl@sss.pgh.pa.us>
2001-01-30 06:35       ` Milind Patil <milind@bombay.retortsoft.com>

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