Re: Limit postgres user logins

From: John R Pierce <pierce(at)hogranch(dot)com>
To: gvim <gvimrc(at)googlemail(dot)com>
Cc: pgsql <pgsql-general(at)postgresql(dot)org>
Subject: Re: Limit postgres user logins
Date: 2010-04-15 23:30:07
Message-ID: 4BC7A17F.1040705@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

gvim wrote:
> My hba file has:
>
> local all postgres md5
> host all admin 127.0.0.1/32 md5
> host all dbuser 127.0.0.1/32 md5
>
> But that still allows users other than postgres to attempt to login as
> postgres. Is there any way I can limit access to the postgres user
> specified as being logged in as postgres?

on the first line (and only the first line), change md5 to ident
sameuser [leave sameuser off on 8.4]

then the postgres user can only log on as himself and noone else can.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jorge Godoy 2010-04-16 00:49:33 Re: General Question about database -- redirection
Previous Message gvim 2010-04-15 23:15:25 Limit postgres user logins