Re: Re: using LDAP for connection information lookup to do remote database connection

From: Garry Chen <gc92(at)cornell(dot)edu>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>, "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Re: using LDAP for connection information lookup to do remote database connection
Date: 2017-09-20 15:51:15
Message-ID: B9745643-39BA-4578-99A6-1AE4721E0EE8@cornell.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hmm the PGUSER is not working:

(GC92(at)gmc013:/users/gc92)
> PGUSER=dmtools
(GC92(at)gmc013:/users/gc92)
> psql "service=pgrls"
Password:
psql: FATAL: password authentication failed for user "gc92"
FATAL: password authentication failed for user "gc92"
(GC92(at)gmc013:/users/gc92)
> echo $PGUSER
dmtools
(GC92(at)gmc013:/users/gc92)

On 9/20/17, 11:43 AM, "Alvaro Herrera" <alvherre(at)alvh(dot)no-ip(dot)org> wrote:

Garry Chen wrote:
>
> Hi Alb,
> Is there a way to give a username and passwd at the connection time? Another word, not to set the username in gp_server.conf file. Because psql just used my OS login id as username When I remove the username from pg_server.conf file.

Hi Garr,

You can use the PGUSER environment variable to set the username, and a
.pgpass file (or another file pointed to by the PGPASSFILE environment
variable) to give a password.

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Alvaro Herrera 2017-09-20 16:50:18 Re: Re: using LDAP for connection information lookup to do remote database connection
Previous Message Alvaro Herrera 2017-09-20 15:43:42 Re: Re: using LDAP for connection information lookup to do remote database connection