Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: can't open file '/var/root/.pgpass' ?


  • From: Dave Page <dpage(at)vale-housing(dot)co(dot)uk>
  • To: <openmacnews(at)gmail(dot)com>, <pgadmin-hackers(at)postgresql(dot)org>
  • Subject: Re: can't open file '/var/root/.pgpass' ?
  • Date: Tue, 17 Jan 2006 22:00:05 +0000
  • Message-id: <BFF31965(dot)3ECE%dpage(at)vale-housing(dot)co(dot)uk>



On 17/1/06 21:43, "OpenMacNews" <openmacnews(at)gmail(dot)com> wrote:

> neither.  launching the GUI by dubl-click from my 'normal (non-root)' user
> desktop ...

OK, that's a little weird. What is $HOME set to? On my box it's
/Users/dpage. 
 
>> Anyway, do you get this only when you opt to save the password?
> 
> hrm ... this time, on server connect i get:
> 
> "Error connecting to the server: fe_sendauth: no password supplied"
> 
> and, yes, it only seems to happen if i "store password" ...

So it sounds like it's not writing the file properly. The function below is
the one that figures out the filename. It would appear that it would most
likely be wxStandardPaths that's getting it wrong if anything, but then it
works fine for me.

wxString pgServer::passwordFilename()
{
    wxStandardPaths stdp;
    wxString fname=stdp.GetUserConfigDir()
#ifdef WIN32
        + wxT("\\postgresql");
    mkdir(fname.ToAscii());
    fname += wxT("\\pgpass.conf");

#else
        + wxT("/.pgpass");
#endif

    wxLogInfo(wxT("Using password file %s"), fname.c_str());    return
fname;
} 

Regards, Dave.




Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group