Re: saved passwords deleted - Mailing list pgadmin-support

From Rohan Carly
Subject Re: saved passwords deleted
Date
Msg-id 4FF2964A.8080908@rohan.id.au
Whole thread Raw
In response to Re: saved passwords deleted  (Guillaume Lelarge <guillaume@lelarge.info>)
Responses Re: saved passwords deleted
List pgadmin-support
On 17/02/2012 6:33 AM, Guillaume Lelarge wrote:
> On Wed, 2012-02-15 at 05:16 -0600, Michael Shapiro wrote:
>> I have taken to making a copy of the password file so that when the
>> connection fails and PgAdmin removes the password, I can put it back.
>>
> I think I've found your issue. Here is the way to trigger it:
>
> 1. Start PostgreSQL
> 2. Start pgAdmin
> 3. Connect to your server without typing a password (thanks to .pgpass)
> 4. Disconnect from your server
> 5. Stop PostgreSQL (not pgAdmin)
> 6. Connect to your server
>     --> error because PostgreSQL is not started
> 7. Start PostgreSQL
> 8. Connect to your server
>     --> pgAdmin asks for your password
>         if you click OK here without typing your password, then pgAdmin
>         records an empty password in the .pgpass file
>
> The fix I pushed a few minutes ago doesn't allow pgAdmin to record an
> empty password.
>
> I suppose it'll fix your issue. If you can test the current code (master
> or REL-1_14_0_PATCHES), that would be great.
>
>
I frequently hit this bug also, using pgAdmin III v.1.14.1 on Windows.

It is not as complex as step 8 above suggests. Even if you press [Cancel], 
pgAdmin still forgets your password. Perhaps the solution would be to display 
the password prompt in this scenario, but prepopulate it with the previous 
password? Then I could just press OK and continue working.

I note that the passwords in 
C:\Users\rohan\AppData\Roaming\postgresql\pgpass.conf are in plain text.
From reading this thread, and some experimentation, I discovered that pgAdmin 
does not actually delete my password from the pgpass.conf file, even though it 
appears that way from the frontend. Therefore my quickest workaround is to 
completely close out of pgAdmin, open it again, and double-click on the saved 
connection. Provided I have fixed the connection problem (stopped server etc) 
it does not re-prompt for my password. It would still be preferable to have 
this fixed though.

Thanks all for your excellent free software.



pgadmin-support by date:

Previous
From: Guillaume Lelarge
Date:
Subject: Re: default parameters
Next
From: Kozusznik Michal
Date:
Subject: Re: default parameters