Re: Stop pgpass.conf EOL conversion

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Daniel Browning <db(at)kavod(dot)com>
Cc: pgAdmin Support <pgadmin-support(at)postgresql(dot)org>
Subject: Re: Stop pgpass.conf EOL conversion
Date: 2014-09-08 10:06:26
Message-ID: CA+OCxoxKvw0rJEjdy9E7P4M9wELVzUNM0HXwT2REkUiRoXRqvA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

On Fri, Sep 5, 2014 at 9:55 PM, Daniel Browning <db(at)kavod(dot)com> wrote:
> On Friday 05 September 2014 12:38:26 pm Dave Page wrote:
>> pgAdmin writes that file whenever a user successfully logs into a server
>> with a new password for the first time, and opts to save it.
>
> Ah, that probably explains what happened to me. I had all my passwords already
> setup in pgpass, and every time I connected to a new server, pgAdmin would ask
> me for a password, which of course I left blank because it was already in
> pgpass. After a while of repeatedly hitting enter on the same password dialog
> box, I finally clicked the save password checkbox (with a blank password), and
> it stopped asking me.
>
> So maybe the pgAdmin might just stop updating the pgpass file when a user is
> trying to "save" a blank password?

I'd have to spend some time to remind myself of the logic around how
this works again exactly (which isn't going to be for a while I doubt,
so you may want to look into it), however, I do remember that it only
saves on successful connection to the server, so it should always have
a useful entry in there.

>> If the user then edits the file in notepad (maybe to add new details for a
>> server to use from psql), they'll run into problems.
>
> I'm fine with pgAdmin converting to Windows EOLs if the user changes or saves
> passwords in pgAdmin. But it seems like there's a place for users who just
> want pgAdmin to read the passwords, not change them or rewrite the file for no
> reason except to change the EOL chars.

Well one option would be to have a global option to prevent saving of
passwords at all. That would solve the issue - and they would still be
used if present in the file.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgadmin-support by date

  From Date Subject
Next Message Evan Martin 2014-09-08 15:12:47 Types beginning with underscores are not shown in treeview
Previous Message Daniel Browning 2014-09-05 20:55:31 Re: Stop pgpass.conf EOL conversion