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: 2006-01-17 22:00:05
Message-ID: BFF31965.3ECE%dpage@vale-housing.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

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.

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message OpenMacNews 2006-01-17 22:09:39 Re: can't open file '/var/root/.pgpass' ?
Previous Message OpenMacNews 2006-01-17 21:43:22 Re: can't open file '/var/root/.pgpass' ?