pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedPassword when logging into postgres
3+ messages / 3 participants
[nested] [flat]
* Password when logging into postgres
@ 2011-09-01 13:48 Campbell, Lance <lance@illinois.edu>
0 siblings, 2 replies; 3+ messages in thread
From: Campbell, Lance @ 2011-09-01 13:48 UTC (permalink / raw)
To: pgsql-admin
Postgres 9.0.4
I installed from the visual linux installer
Redhat 6 newest updates
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?
Thanks,
Lance
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Password when logging into postgres
@ 2011-09-01 13:52 Scott Marlowe <scott.marlowe@gmail.com>
parent: Campbell, Lance <lance@illinois.edu>
1 sibling, 0 replies; 3+ messages in thread
From: Scott Marlowe @ 2011-09-01 13:52 UTC (permalink / raw)
To: Campbell, Lance <lance@illinois.edu>; +Cc: pgsql-admin
On Thu, Sep 1, 2011 at 7:48 AM, Campbell, Lance <lance@illinois.edu> wrote:
> Postgres 9.0.4
> I installed from the visual linux installer
> Redhat 6 newest updates
>
> 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?
two ways.
1: Set the pg server to just trust this user, connecting to x database
or all databases using the pg_hba.conf file
2: Set the normal md5 method in pg_hba.conf and use .pgpass file
(http://wiki.postgresql.org/wiki/Pgpass) to set a password for libpq
to use when that user logs into the db.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Password when logging into postgres
@ 2011-09-01 13:54 Gabriele Bartolini <Gabriele.Bartolini@2ndQuadrant.it>
parent: Campbell, Lance <lance@illinois.edu>
1 sibling, 0 replies; 3+ messages in thread
From: Gabriele Bartolini @ 2011-09-01 13:54 UTC (permalink / raw)
To: Campbell, Lance <lance@illinois.edu>; +Cc: 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
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2011-09-01 13:54 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-09-01 13:48 Password when logging into postgres Campbell, Lance <lance@illinois.edu>
2011-09-01 13:52 ` Scott Marlowe <scott.marlowe@gmail.com>
2011-09-01 13:54 ` Gabriele Bartolini <Gabriele.Bartolini@2ndQuadrant.it>
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