View Single Post

   
  #4 (permalink)  
Old 04-17-2008, 05:53 PM
Dave Page
 
Posts: n/a
Default Re: can't open file '/var/root/.pgpass' ?




On 17/1/06 21:43, "OpenMacNews" <openmacnews@gmail.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:asswordFilename()
{
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.


---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Reply With Quote