Обсуждение: saved passwords deleted
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 />
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
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
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
On Tue, Feb 14, 2012 at 22:03, Guillaume Lelarge <guillaume@lelarge.info> wrote:
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
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
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
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
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.
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.
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
On Tue, Feb 14, 2012 at 22:45, Guillaume Lelarge <guillaume@lelarge.info> wrote:
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.
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.
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.
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
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.
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
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.
I ran into this and the behavior actually make some sense -- PgAdmin can't know why the connection was rejected so it has to deal with the possibility that the stored might be wrong. One idea is for PgAdmin to give an option of either reconnecting using the stored password or to enter a new one.
On Wed, Jul 4, 2012 at 8:13 PM, Rohan Carly <rohan@digins.net.au> wrote:
On 5/07/2012 3:57 AM, Guillaume Lelarge wrote:On Tue, 2012-07-03 at 14:50 +0800, Rohan Carly wrote: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.On 17/02/2012 6:33 AM, Guillaume Lelarge wrote:Have you tried 1.14.3? does it still happen?On Wed, 2012-02-15 at 05:16 -0600, Michael Shapiro wrote:I frequently hit this bug also, using pgAdmin III v.1.14.1 on Windows.I have taken to making a copy of the password file so that when theI think I've found your issue. Here is the way to trigger it:
connection fails and PgAdmin removes the password, I can put it back.
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.
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.
That's exactly why it does it.
On Thursday, July 5, 2012, Michael Shapiro wrote:
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
On Thursday, July 5, 2012, Michael Shapiro wrote:
I ran into this and the behavior actually make some sense -- PgAdmin can't know why the connection was rejected so it has to deal with the possibility that the stored might be wrong. One idea is for PgAdmin to give an option of either reconnecting using the stored password or to enter a new one.On Wed, Jul 4, 2012 at 8:13 PM, Rohan Carly <rohan@digins.net.au> wrote:On 5/07/2012 3:57 AM, Guillaume Lelarge wrote:On Tue, 2012-07-03 at 14:50 +0800, Rohan Carly wrote: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.On 17/02/2012 6:33 AM, Guillaume Lelarge wrote:Have you tried 1.14.3? does it still happen?On Wed, 2012-02-15 at 05:16 -0600, Michael Shapiro wrote:I frequently hit this bug also, using pgAdmin III v.1.14.1 on Windows.I have taken to making a copy of the password file so that when theI think I've found your issue. Here is the way to trigger it:
connection fails and PgAdmin removes the password, I can put it back.
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.
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.
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
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.
I figured this out, too. But it might be nice to offer, during a reconnect, to use the saved password (as well as allowing a new one to be typed in). That would at least avoid people thinking that the save password was lost.
On Thu, Jul 5, 2012 at 1:57 AM, Dave Page <dpage@pgadmin.org> wrote:
That's exactly why it does it.
On Thursday, July 5, 2012, Michael Shapiro wrote:I ran into this and the behavior actually make some sense -- PgAdmin can't know why the connection was rejected so it has to deal with the possibility that the stored might be wrong. One idea is for PgAdmin to give an option of either reconnecting using the stored password or to enter a new one.On Wed, Jul 4, 2012 at 8:13 PM, Rohan Carly <rohan@digins.net.au> wrote:On 5/07/2012 3:57 AM, Guillaume Lelarge wrote:On Tue, 2012-07-03 at 14:50 +0800, Rohan Carly wrote: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.On 17/02/2012 6:33 AM, Guillaume Lelarge wrote:Have you tried 1.14.3? does it still happen?On Wed, 2012-02-15 at 05:16 -0600, Michael Shapiro wrote:I frequently hit this bug also, using pgAdmin III v.1.14.1 on Windows.I have taken to making a copy of the password file so that when theI think I've found your issue. Here is the way to trigger it:
connection fails and PgAdmin removes the password, I can put it back.
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.
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.
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company