Re: Password when logging into postgres - Mailing list pgsql-admin

From Gabriele Bartolini
Subject Re: Password when logging into postgres
Date
Msg-id 7f3d59de730b7a9be663deda073e5e05@2ndquadrant.it
Whole thread Raw
In response to Password when logging into postgres  ("Campbell, Lance" <lance@illinois.edu>)
List pgsql-admin
 Hi Lance,

>  I reinstalled postgres from scratch receintly. I recreated a role
> with createrole called XYZ. I do not want XYZ to use a password on my
> local box. How do I set this up so that it will not ask for a
> password?

 You have two options:

 1) insert a line in ~/.pgpass file in your home directory for that
 database user
 (http://www.postgresql.org/docs/9.0/static/libpq-pgpass.html)
 2) insert a 'trust' rule for that user in the pg_hba.conf for local
 connections
 (http://www.postgresql.org/docs/9.0/static/auth-pg-hba-conf.html)

 I would personally go with #1 in production environment.

 Cheers,
 Gabriele

--
  Gabriele Bartolini - 2ndQuadrant Italia
  PostgreSQL Training, Services and Support
  Gabriele.Bartolini@2ndQuadrant.it - www.2ndQuadrant.it

pgsql-admin by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: Password when logging into postgres
Next
From: Marc Cousin
Date:
Subject: pg_restore -j mixed and missing lines of output