Re: Enable user access from remote host - Mailing list pgsql-general

From John R Pierce
Subject Re: Enable user access from remote host
Date
Msg-id 49B41C83.5060606@hogranch.com
Whole thread Raw
In response to Re: Enable user access from remote host  (Piotre Ugrumov <afmulone@gmail.com>)
Responses Re: Enable user access from remote host  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Piotre Ugrumov wrote:
> Hi,
> I inserted this line at the end of the pg_hba.conf
>
> host    test        angelo      ""          ident sameuser
>
> I inserted the "" to allow to everyone to access to the db.
> But if I try to access, from another host, I receive an error. What is
> the error in that line?
>

    host test angelo         0.0.0.0/0         ident sameuser

if you want to allow angelo to connect to database test from any IP...
*HOWEVER*   "ident sameuser" should *not* be used for HOST connections,
its only reliable for LOCAL connections.   instead, assign angelo a
password...

    alter user angelo with encrypted password 'somepassword';

and in pg_hba.conf, specify...

    host test angelo      0.0.0.0/0      md5

note, also, if there are any pg_hba.conf records in FRONT of this one
which would match on the connection, they will be used INSTEAD...  for
instance...

    host all all 192.168.1.0/24   md5

that allows any user, any database on the subnet 192.168.1.0/24 to
connect with md5 password authentication, and any following records
would be ignored.



pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: Performance of subselects
Next
From: Mark Mandel
Date:
Subject: Re: Random Deadlock on DROP CONSTRAINT