[PLUG] PostgreSQL configuration.

Jeff Schwaber freyley at gmx.net
Mon Mar 29 18:42:02 UTC 2004


On Mon, 2004-03-29 at 14:58, Jeme A Brelin wrote:
> I have an internal database server that is serving information to a series
> of CGI applications on a public webserver.

> Is there a way to configure postgres such that trust authentication is
> only used for certain database users and others are going to use pam or
> another authentication method?
> 
> Am I misunderstanding the postgres authentication model?

Put multiple lines in the config file, for different users.

so for example:
type	db	user				method
local	all	postgres			ident sameuser
host	all	all	127.0.0.1		password

means if you're connecting by tcp/ip from localhost, it asks for a
password. If user postgres is connecting locally, i.e. a unix socket, it
allows it in.

So to use trust for certain users, do

local	all	my_user				trust

rather than

local	all	all				trust

I may be misunderestimating[tm] the problem.

Jeff

> Thanks.
> J.





More information about the PLUG mailing list