Thread: saved passwords deleted

saved passwords deleted

From
Michael Shapiro
Date:
I noticed that if I have a problem connecting to a server for which I have a saved password, the entry in pgpass.conf
isdeleted.<br />When I later succeed in connecting, the server then prompts for a password (and the pgpass.conf entry
isadded back).<br /><br />Is it possible to not delete the entry if the connection fails?<br /> 

Re: saved passwords deleted

From
Guillaume Lelarge
Date:
Le 05/11/2010 17:18, Michael Shapiro a écrit :
> I noticed that if I have a problem connecting to a server for which I have a
> saved password, the entry in pgpass.conf is deleted.
> When I later succeed in connecting, the server then prompts for a password
> (and the pgpass.conf entry is added back).
> 
> Is it possible to not delete the entry if the connection fails?
> 

Right now, no. And I can't find this dialog now, must be too tired.

But, yes, it could probably be a good idea to add such an option.


-- 
Guillaumehttp://www.postgresql.frhttp://dalibo.com


Re: saved passwords deleted

From
Guillaume Lelarge
Date:
Le 06/11/2010 22:35, Guillaume Lelarge a écrit :
> Le 05/11/2010 17:18, Michael Shapiro a écrit :
>> I noticed that if I have a problem connecting to a server for which I have a
>> saved password, the entry in pgpass.conf is deleted.
>> When I later succeed in connecting, the server then prompts for a password
>> (and the pgpass.conf entry is added back).
>>
>> Is it possible to not delete the entry if the connection fails?
>>
> 
> Right now, no. And I can't find this dialog now, must be too tired.
> 
> But, yes, it could probably be a good idea to add such an option.
> 

I also created a ticket to remind us to work on this dialog.


-- 
Guillaumehttp://www.postgresql.frhttp://dalibo.com


Re: saved passwords deleted

From
Guillaume Lelarge
Date:
On Mon, 2010-11-08 at 16:16 +0100, Guillaume Lelarge wrote:
> Le 06/11/2010 22:35, Guillaume Lelarge a écrit :
> > Le 05/11/2010 17:18, Michael Shapiro a écrit :
> >> I noticed that if I have a problem connecting to a server for which I have a
> >> saved password, the entry in pgpass.conf is deleted.
> >> When I later succeed in connecting, the server then prompts for a password
> >> (and the pgpass.conf entry is added back).
> >>
> >> Is it possible to not delete the entry if the connection fails?
> >>
> >
> > Right now, no. And I can't find this dialog now, must be too tired.
> >
> > But, yes, it could probably be a good idea to add such an option.
> >
>
> I also created a ticket to remind us to work on this dialog.
>

I tried quite some time to reproduce the issue tonight, and failed to do
so. The only time it removes the password is when I unchecked the "Store
password" checkbox, which appears to be a valid behaviour.

Unless you're able to show me how to do this, I'm afraid we won't do
anything on that matter (because there is nothing to do).


--
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com



Re: saved passwords deleted

From
Vik Reykja
Date:
On Tue, Feb 14, 2012 at 22:03, Guillaume Lelarge <guillaume@lelarge.info> wrote:
On Mon, 2010-11-08 at 16:16 +0100, Guillaume Lelarge wrote:
> Le 06/11/2010 22:35, Guillaume Lelarge a écrit :
> > Le 05/11/2010 17:18, Michael Shapiro a écrit :
> >> I noticed that if I have a problem connecting to a server for which I have a
> >> saved password, the entry in pgpass.conf is deleted.
> >> When I later succeed in connecting, the server then prompts for a password
> >> (and the pgpass.conf entry is added back).
> >>
> >> Is it possible to not delete the entry if the connection fails?
> >>
> >
> > Right now, no. And I can't find this dialog now, must be too tired.
> >
> > But, yes, it could probably be a good idea to add such an option.
> >
>
> I also created a ticket to remind us to work on this dialog.
>

I tried quite some time to reproduce the issue tonight, and failed to do
so. The only time it removes the password is when I unchecked the "Store
password" checkbox, which appears to be a valid behaviour.

Unless you're able to show me how to do this, I'm afraid we won't do
anything on that matter (because there is nothing to do).

This is how it happens to me (on Windows at work, I haven't tried on linux at home and I don't have a mac):

1. connect to server, save password
2. disconnect from server
3. stop server
4. connect to server (fails, of course)
5. start server
6. connect to server

pgAdmin asks for my password


Re: saved passwords deleted

From
Dave Page
Date:
On Tue, Feb 14, 2012 at 9:21 PM, Vik Reykja <vikreykja@gmail.com> wrote:
> On Tue, Feb 14, 2012 at 22:03, Guillaume Lelarge <guillaume@lelarge.info>
> wrote:
>>
>> On Mon, 2010-11-08 at 16:16 +0100, Guillaume Lelarge wrote:
>> > Le 06/11/2010 22:35, Guillaume Lelarge a écrit :
>> > > Le 05/11/2010 17:18, Michael Shapiro a écrit :
>> > >> I noticed that if I have a problem connecting to a server for which I
>> > >> have a
>> > >> saved password, the entry in pgpass.conf is deleted.
>> > >> When I later succeed in connecting, the server then prompts for a
>> > >> password
>> > >> (and the pgpass.conf entry is added back).
>> > >>
>> > >> Is it possible to not delete the entry if the connection fails?
>> > >>
>> > >
>> > > Right now, no. And I can't find this dialog now, must be too tired.
>> > >
>> > > But, yes, it could probably be a good idea to add such an option.
>> > >
>> >
>> > I also created a ticket to remind us to work on this dialog.
>> >
>>
>> I tried quite some time to reproduce the issue tonight, and failed to do
>> so. The only time it removes the password is when I unchecked the "Store
>> password" checkbox, which appears to be a valid behaviour.
>>
>> Unless you're able to show me how to do this, I'm afraid we won't do
>> anything on that matter (because there is nothing to do).
>
>
> This is how it happens to me (on Windows at work, I haven't tried on linux
> at home and I don't have a mac):
>
> 1. connect to server, save password
> 2. disconnect from server
> 3. stop server
> 4. connect to server (fails, of course)
> 5. start server
> 6. connect to server
>
> pgAdmin asks for my password

That's intentional. A failed connection attempt causes the password to
be dropped to prevent you getting stuck in a situation where you
cannot login without manually editing the file to get round some
random authentication issue.


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

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


Re: saved passwords deleted

From
Guillaume Lelarge
Date:
On Tue, 2012-02-14 at 21:25 +0000, Dave Page wrote:
> On Tue, Feb 14, 2012 at 9:21 PM, Vik Reykja <vikreykja@gmail.com> wrote:
> > On Tue, Feb 14, 2012 at 22:03, Guillaume Lelarge <guillaume@lelarge.info>
> > wrote:
> >>
> >> On Mon, 2010-11-08 at 16:16 +0100, Guillaume Lelarge wrote:
> >> > Le 06/11/2010 22:35, Guillaume Lelarge a écrit :
> >> > > Le 05/11/2010 17:18, Michael Shapiro a écrit :
> >> > >> I noticed that if I have a problem connecting to a server for which I
> >> > >> have a
> >> > >> saved password, the entry in pgpass.conf is deleted.
> >> > >> When I later succeed in connecting, the server then prompts for a
> >> > >> password
> >> > >> (and the pgpass.conf entry is added back).
> >> > >>
> >> > >> Is it possible to not delete the entry if the connection fails?
> >> > >>
> >> > >
> >> > > Right now, no. And I can't find this dialog now, must be too tired.
> >> > >
> >> > > But, yes, it could probably be a good idea to add such an option.
> >> > >
> >> >
> >> > I also created a ticket to remind us to work on this dialog.
> >> >
> >>
> >> I tried quite some time to reproduce the issue tonight, and failed to do
> >> so. The only time it removes the password is when I unchecked the "Store
> >> password" checkbox, which appears to be a valid behaviour.
> >>
> >> Unless you're able to show me how to do this, I'm afraid we won't do
> >> anything on that matter (because there is nothing to do).
> >
> >
> > This is how it happens to me (on Windows at work, I haven't tried on linux
> > at home and I don't have a mac):
> >
> > 1. connect to server, save password
> > 2. disconnect from server
> > 3. stop server
> > 4. connect to server (fails, of course)
> > 5. start server
> > 6. connect to server
> >
> > pgAdmin asks for my password
>
> That's intentional. A failed connection attempt causes the password to
> be dropped to prevent you getting stuck in a situation where you
> cannot login without manually editing the file to get round some
> random authentication issue.
>

Yes, that's what I found too. And the password is still available in the
file. We can probably be a bit smarter, and check the connection error
we got.


--
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com



Re: saved passwords deleted

From
Vik Reykja
Date:
<div class="gmail_quote">On Tue, Feb 14, 2012 at 22:25, Dave Page <span dir="ltr"><<a
href="mailto:dpage@pgadmin.org">dpage@pgadmin.org</a>></span>wrote:<br /><blockquote class="gmail_quote"
style="margin:00 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":1g0">> 1. connect to server, save
password<br/> > 2. disconnect from server<br /> > 3. stop server<br /> > 4. connect to server (fails, of
course)<br/> > 5. start server<br /> > 6. connect to server<br /> ><br /> > pgAdmin asks for my password<br
/><br/> That's intentional. A failed connection attempt causes the password to<br /> be dropped to prevent you getting
stuckin a situation where you<br /> cannot login without manually editing the file to get round some<br /> random
authenticationissue.</div></blockquote></div><br />So it's an infinite loop issue and not a security issue?  I would
ratherhave a separate option somewhere to connect without saved password.<br /><br />Our product "embeds" PG so all the
non-techemployees (like the sales guys) have it running on their computers.  They call me for help and I connect to
themand fail and tell them to turn off their firewall or whatever (again) and then I have to lookup their password.  My
usagemay not be common enough for a generic tool to deal with, but it certainly is annoying.<br /> 

Re: saved passwords deleted

From
Guillaume Lelarge
Date:
On Tue, 2012-02-14 at 22:33 +0100, Vik Reykja wrote:
> On Tue, Feb 14, 2012 at 22:25, Dave Page <dpage@pgadmin.org> wrote:
>         > 1. connect to server, save password
>         > 2. disconnect from server
>         > 3. stop server
>         > 4. connect to server (fails, of course)
>         > 5. start server
>         > 6. connect to server
>         >
>         > pgAdmin asks for my password
>         
>         That's intentional. A failed connection attempt causes the
>         password to
>         be dropped to prevent you getting stuck in a situation where
>         you
>         cannot login without manually editing the file to get round
>         some
>         random authentication issue.
> 
> So it's an infinite loop issue and not a security issue?  I would
> rather have a separate option somewhere to connect without saved
> password.
> 

You can connect without saving the password: let the "Save password"
checkbox unchecked.

> Our product "embeds" PG so all the non-tech employees (like the sales
> guys) have it running on their computers.  They call me for help and I
> connect to them and fail and tell them to turn off their firewall or
> whatever (again) and then I have to lookup their password.  My usage
> may not be common enough for a generic tool to deal with, but it
> certainly is annoying.

I'm not sure what you meant here.


-- 
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com



Re: saved passwords deleted

From
Vik Reykja
Date:
On Tue, Feb 14, 2012 at 22:45, Guillaume Lelarge <span dir="ltr"><<a
href="mailto:guillaume@lelarge.info">guillaume@lelarge.info</a>></span>wrote:<br /><div
class="gmail_quote"><blockquoteclass="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc
solid;padding-left:1ex"><divid=":10x">You can connect without saving the password: let the "Save password"<br />
checkboxunchecked.</div></blockquote></div><br />Sure, but then I'd have to enter it in every time.  That's not what I
want. I want it to not forget the password just because there was a connection problem. Dave says it's intentional in
casethe auto-password is causing the connection problem but surely that's not the most common cause of connection
failure. It certainly isn't in my usage.<br /> 

Re: saved passwords deleted

From
Michael Shapiro
Date:
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.

On Wed, Feb 15, 2012 at 4:27 AM, Vik Reykja <vikreykja@gmail.com> wrote:
On Tue, Feb 14, 2012 at 22:45, Guillaume Lelarge <guillaume@lelarge.info> wrote:
You can connect without saving the password: let the "Save password"
checkbox unchecked.

Sure, but then I'd have to enter it in every time.  That's not what I want.  I want it to not forget the password just because there was a connection problem. Dave says it's intentional in case the auto-password is causing the connection problem but surely that's not the most common cause of connection failure.  It certainly isn't in my usage.

Re: saved passwords deleted

From
Guillaume Lelarge
Date:
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,
thenpgAdmin      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.


-- 
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com



Re: saved passwords deleted

From
Rohan Carly
Date:
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.



Re: saved passwords deleted

From
Guillaume Lelarge
Date:
On Tue, 2012-07-03 at 14:50 +0800, Rohan Carly wrote:
> 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.
> 

Have you tried 1.14.3? does it still happen?

> Thanks all for your excellent free software.
> 

You're welcome.


-- 
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com



Re: saved passwords deleted

From
Rohan Carly
Date:
On 5/07/2012 3:57 AM, Guillaume Lelarge wrote:
> On Tue, 2012-07-03 at 14:50 +0800, Rohan Carly wrote:
>> 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.
>>
> Have you tried 1.14.3? does it still happen?
>
Yes, the problem is still present in 1.14.3, I just tried it this morning. As 
soon as I get the "server doesn't listen" dialog box, I not that I will not be 
able to connect again without either supplying a password, or restarting pgAdmin.




Re: saved passwords deleted

From
Michael Shapiro
Date:
I ran into this and the behavior actually make some sense -- PgAdmin can't know why the connection was rejected so it
hasto deal with the possibility that the stored might be wrong. One idea is for PgAdmin to give an option of either
reconnectingusing the stored password or to enter a new one.<br /><br /><br /><br /><div class="gmail_quote">On Wed,
Jul4, 2012 at 8:13 PM, Rohan Carly <span dir="ltr"><<a href="mailto:rohan@digins.net.au"
target="_blank">rohan@digins.net.au</a>></span>wrote:<br /><blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px#ccc solid;padding-left:1ex"> On 5/07/2012 3:57 AM, Guillaume Lelarge wrote:<br /><blockquote
class="gmail_quote"style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> On Tue, 2012-07-03 at 14:50
+0800,Rohan Carly wrote:<br /><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc
solid;padding-left:1ex">On 17/02/2012 6:33 AM, Guillaume Lelarge wrote:<br /><blockquote class="gmail_quote"
style="margin:00 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> On Wed, 2012-02-15 at 05:16 -0600, Michael
Shapirowrote:<br /><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc
solid;padding-left:1ex">I have taken to making a copy of the password file so that when the<br /> connection fails and
PgAdminremoves the password, I can put it back.<br /><br /></blockquote> I think I've found your issue. Here is the way
totrigger it:<br /><br /> 1. Start PostgreSQL<br /> 2. Start pgAdmin<br /> 3. Connect to your server without typing a
password(thanks to .pgpass)<br /> 4. Disconnect from your server<br /> 5. Stop PostgreSQL (not pgAdmin)<br /> 6.
Connectto your server<br />      --> error because PostgreSQL is not started<br /> 7. Start PostgreSQL<br /> 8.
Connectto your server<br />      --> pgAdmin asks for your password<br />          if you click OK here without
typingyour password, then pgAdmin<br />          records an empty password in the .pgpass file<br /><br /> The fix I
pusheda few minutes ago doesn't allow pgAdmin to record an<br /> empty password.<br /><br /> I suppose it'll fix your
issue.If you can test the current code (master<br /> or REL-1_14_0_PATCHES), that would be great.<br /><br /><br
/></blockquote>I frequently hit this bug also, using pgAdmin III v.1.14.1 on Windows.<br /><br /> It is not as complex
asstep 8 above suggests. Even if you press [Cancel],<br /> pgAdmin still forgets your password. Perhaps the solution
wouldbe to display<br /> the password prompt in this scenario, but prepopulate it with the previous<br /> password?
ThenI could just press OK and continue working.<br /><br /> I note that the passwords in<br />
C:\Users\rohan\AppData\<u></u>Roaming\postgresql\pgpass.confare in plain text.<br /><br />   From reading this thread,
andsome experimentation, I discovered that pgAdmin<br /> does not actually delete my password from the pgpass.conf
file,even though it<br /> appears that way from the frontend. Therefore my quickest workaround is to<br /> completely
closeout of pgAdmin, open it again, and double-click on the saved<br /> connection. Provided I have fixed the
connectionproblem (stopped server etc)<br /> it does not re-prompt for my password. It would still be preferable to
have<br/> this fixed though.<br /><br /></blockquote> Have you tried 1.14.3? does it still happen?<br /><br
/></blockquote>Yes, the problem is still present in 1.14.3, I just tried it this morning. As soon as I get the "server
doesn'tlisten" dialog box, I not that I will not be able to connect again without either supplying a password, or
restartingpgAdmin.<br /><br /></blockquote></div><br /> 

Re: saved passwords deleted

From
Dave Page
Date:
That's exactly why it does it.<span></span><br /><br />On Thursday, July 5, 2012, Michael Shapiro wrote:<br
/><blockquoteclass="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I ran into this
andthe behavior actually make some sense -- PgAdmin can't know why the connection was rejected so it has to deal with
thepossibility that the stored might be wrong. One idea is for PgAdmin to give an option of either reconnecting using
thestored password or to enter a new one.<br /><br /><br /><br /><div class="gmail_quote">On Wed, Jul 4, 2012 at 8:13
PM,Rohan Carly <span dir="ltr"><<a href="javascript:_e({}, 'cvml', 'rohan@digins.net.au');"
target="_blank">rohan@digins.net.au</a>></span>wrote:<br /><blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px#ccc solid;padding-left:1ex"> On 5/07/2012 3:57 AM, Guillaume Lelarge wrote:<br /><blockquote
class="gmail_quote"style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> On Tue, 2012-07-03 at 14:50
+0800,Rohan Carly wrote:<br /><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc
solid;padding-left:1ex">On 17/02/2012 6:33 AM, Guillaume Lelarge wrote:<br /><blockquote class="gmail_quote"
style="margin:00 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> On Wed, 2012-02-15 at 05:16 -0600, Michael
Shapirowrote:<br /><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc
solid;padding-left:1ex">I have taken to making a copy of the password file so that when the<br /> connection fails and
PgAdminremoves the password, I can put it back.<br /><br /></blockquote> I think I've found your issue. Here is the way
totrigger it:<br /><br /> 1. Start PostgreSQL<br /> 2. Start pgAdmin<br /> 3. Connect to your server without typing a
password(thanks to .pgpass)<br /> 4. Disconnect from your server<br /> 5. Stop PostgreSQL (not pgAdmin)<br /> 6.
Connectto your server<br />      --> error because PostgreSQL is not started<br /> 7. Start PostgreSQL<br /> 8.
Connectto your server<br />      --> pgAdmin asks for your password<br />          if you click OK here without
typingyour password, then pgAdmin<br />          records an empty password in the .pgpass file<br /><br /> The fix I
pusheda few minutes ago doesn't allow pgAdmin to record an<br /> empty password.<br /><br /> I suppose it'll fix your
issue.If you can test the current code (master<br /> or REL-1_14_0_PATCHES), that would be great.<br /><br /><br
/></blockquote>I frequently hit this bug also, using pgAdmin III v.1.14.1 on Windows.<br /><br /> It is not as complex
asstep 8 above suggests. Even if you press [Cancel],<br /> pgAdmin still forgets your password. Perhaps the solution
wouldbe to display<br /> the password prompt in this scenario, but prepopulate it with the previous<br /> password?
ThenI could just press OK and continue working.<br /><br /> I note that the passwords in<br />
C:\Users\rohan\AppData\<u></u>Roaming\postgresql\pgpass.confare in plain text.<br /><br />   From reading this thread,
andsome experimentation, I discovered that pgAdmin<br /> does not actually delete my password from the pgpass.conf
file,even though it<br /> appears that way from the frontend. Therefore my quickest workaround is to<br /> completely
closeout of pgAdmin, open it again, and double-click on the saved<br /> connection. Provided I have fixed the
connectionproblem (stopped server etc)<br /> it does not re-prompt for my password. It would still be preferable to
have<br/> this fixed though.<br /><br /></blockquote> Have you tried 1.14.3? does it still happen?<br /><br
/></blockquote>Yes, the problem is still present in 1.14.3, I just tried it this morning. As soon as I get the "server
doesn'tlisten" dialog box, I not that I will not be able to connect again without either supplying a password, or
restartingpgAdmin.<br /><br /></blockquote></div><br /></blockquote><br /><br />-- <br />Dave Page<br />Blog: <a
href="http://pgsnake.blogspot.com"target="_blank">http://pgsnake.blogspot.com</a><br />Twitter: @pgsnake<br /><br
/>EnterpriseDBUK: <a href="http://www.enterprisedb.com" target="_blank">http://www.enterprisedb.com</a><br /> The
EnterprisePostgreSQL Company<br /><br /> 

Re: saved passwords deleted

From
Rohan Carly
Date:
On 5/07/2012 3:57 AM, Guillaume Lelarge wrote:
> On Tue, 2012-07-03 at 14:50 +0800, Rohan Carly wrote:
>> 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.
>>
> Have you tried 1.14.3? does it still happen?
>
Yes, the problem is still present in 1.14.3, I just tried it this morning. As 
soon as I get the "server doesn't listen" dialog box, I not that I will not be 
able to connect again without either supplying a password, or restarting pgAdmin.



Re: saved passwords deleted

From
Michael Shapiro
Date:
I figured this out, too. But it might be nice to offer, during a reconnect, to use the saved password (as well as
allowinga new one to be typed in). That would at least avoid people thinking that the save password was lost.<br /><br
/><br/><br /><div class="gmail_quote">On Thu, Jul 5, 2012 at 1:57 AM, Dave Page <span dir="ltr"><<a
href="mailto:dpage@pgadmin.org"target="_blank">dpage@pgadmin.org</a>></span> wrote:<br /><blockquote
class="gmail_quote"style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> That's exactly why it does
it.<span></span><br/><br />On Thursday, July 5, 2012, Michael Shapiro wrote:<br /><blockquote class="gmail_quote"
style="margin:00 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I ran into this and the behavior actually make
somesense -- PgAdmin can't know why the connection was rejected so it has to deal with the possibility that the stored
mightbe wrong. One idea is for PgAdmin to give an option of either reconnecting using the stored password or to enter a
newone.<br /><br /><br /><br /><div class="gmail_quote">On Wed, Jul 4, 2012 at 8:13 PM, Rohan Carly <span
dir="ltr"><<a>rohan@digins.net.au</a>></span>wrote:<br /><blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px#ccc solid;padding-left:1ex"> On 5/07/2012 3:57 AM, Guillaume Lelarge wrote:<br /><blockquote
class="gmail_quote"style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> On Tue, 2012-07-03 at 14:50
+0800,Rohan Carly wrote:<br /><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc
solid;padding-left:1ex">On 17/02/2012 6:33 AM, Guillaume Lelarge wrote:<br /><blockquote class="gmail_quote"
style="margin:00 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> On Wed, 2012-02-15 at 05:16 -0600, Michael
Shapirowrote:<br /><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc
solid;padding-left:1ex">I have taken to making a copy of the password file so that when the<br /> connection fails and
PgAdminremoves the password, I can put it back.<br /><br /></blockquote> I think I've found your issue. Here is the way
totrigger it:<br /><br /> 1. Start PostgreSQL<br /> 2. Start pgAdmin<br /> 3. Connect to your server without typing a
password(thanks to .pgpass)<br /> 4. Disconnect from your server<br /> 5. Stop PostgreSQL (not pgAdmin)<br /> 6.
Connectto your server<br />      --> error because PostgreSQL is not started<br /> 7. Start PostgreSQL<br /> 8.
Connectto your server<br />      --> pgAdmin asks for your password<br />          if you click OK here without
typingyour password, then pgAdmin<br />          records an empty password in the .pgpass file<br /><br /> The fix I
pusheda few minutes ago doesn't allow pgAdmin to record an<br /> empty password.<br /><br /> I suppose it'll fix your
issue.If you can test the current code (master<br /> or REL-1_14_0_PATCHES), that would be great.<br /><br /><br
/></blockquote>I frequently hit this bug also, using pgAdmin III v.1.14.1 on Windows.<br /><br /> It is not as complex
asstep 8 above suggests. Even if you press [Cancel],<br /> pgAdmin still forgets your password. Perhaps the solution
wouldbe to display<br /> the password prompt in this scenario, but prepopulate it with the previous<br /> password?
ThenI could just press OK and continue working.<br /><br /> I note that the passwords in<br />
C:\Users\rohan\AppData\<u></u>Roaming\postgresql\pgpass.confare in plain text.<br /><br />   From reading this thread,
andsome experimentation, I discovered that pgAdmin<br /> does not actually delete my password from the pgpass.conf
file,even though it<br /> appears that way from the frontend. Therefore my quickest workaround is to<br /> completely
closeout of pgAdmin, open it again, and double-click on the saved<br /> connection. Provided I have fixed the
connectionproblem (stopped server etc)<br /> it does not re-prompt for my password. It would still be preferable to
have<br/> this fixed though.<br /><br /></blockquote> Have you tried 1.14.3? does it still happen?<br /><br
/></blockquote>Yes, the problem is still present in 1.14.3, I just tried it this morning. As soon as I get the "server
doesn'tlisten" dialog box, I not that I will not be able to connect again without either supplying a password, or
restartingpgAdmin.<br /><br /></blockquote></div><br /><span class="HOEnZb"><font color="#888888">
</font></span></blockquote><spanclass="HOEnZb"><font color="#888888"><br /><br />-- <br />Dave Page<br />Blog: <a
href="http://pgsnake.blogspot.com"target="_blank">http://pgsnake.blogspot.com</a><br />Twitter: @pgsnake<br /><br
/>EnterpriseDBUK: <a href="http://www.enterprisedb.com" target="_blank">http://www.enterprisedb.com</a><br /> The
EnterprisePostgreSQL Company<br /><br /></font></span></blockquote></div><br />