Re: Pgagent is not reading pgpass file either in Windows or Linux.

From: nageswara Bandla <nag(dot)bandla(at)gmail(dot)com>
To: George Neuner <gneuner2(at)comcast(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Pgagent is not reading pgpass file either in Windows or Linux.
Date: 2018-05-31 20:40:21
Message-ID: CADJadRBjBpZHqEOn68miwES1sTQp5TMa0qTwVm83X-cf6LD5=g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, May 31, 2018 at 12:57 PM, George Neuner <gneuner2(at)comcast(dot)net>
wrote:

> On Thu, 31 May 2018 11:24:18 -0500, nageswara Bandla
> <nag(dot)bandla(at)gmail(dot)com> wrote:
>
> >On Wed, May 30, 2018 at 7:45 PM, George Neuner <gneuner2(at)comcast(dot)net>
> wrote:
> >
> >> LocalSystem has administrator permissions to virtually everything.
> >> https://msdn.microsoft.com/en-us/library/windows/desktop/
> >> ms684190(v=vs.85).aspx
> >>
> >> It should be able to read files belonging to any user.
> >>
> >> But the LocalSystem account can see only *global* environment
> >> variables ... it can't see any user specific ones. I would check if
> >> the PGPASSFILE variable is set globally or only in the user account.
> >>
> >>
> >> I don't know anything specifically about running pgagent on Windows,
> >> so I can't say why it is giving an error if the docs say it should
> >> not.
> >>
> >
> >
> >I am setting the PGPASSFILE in system environment variables. I am not
> >setting it in user specific environmental variables.
>
>
> It just occurred to me that you said PGPASSFILE was set to
>
> %APPDATA%/postgresql/pgpass.conf
>
>
> The problem may be that when LocalSystem expands %APPDATA%, it is
> finding its own directory, which might be any of:
>
> C:\Windows\ServiceProfiles\LocalService\appdata
> C:\Windows\System32\config\systemprofile\AppData
> C:\Windows\SysWOW64\config\systemprofile\AppData
>
> depending on your Windows version, policies (if any), and whether the
> executable is 32 or 64 bit.
>
>
> I wouldn't try messing with any of these directories. Instead try
> setting PGPASSFILE to the full path to your file.
>
>
I have tried all of them, pgagent is not recognizing any of the above
locations. In fact, I have tried both options

#1. By defining PGPASSFILE to the above locations one after the other.
#2. By copying pgpass.conf to all the three locations by creating
Roaming/postgresql directories.

And also I have defined PGPASSFILE=C:\pgpass.conf; I think, this should be
accessible to any system account. This also not working.

Thank you.

>
> George
>
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ian Bell 2018-05-31 21:08:27 RE: now getting log messages!
Previous Message Adrian Klaver 2018-05-31 20:24:28 Re: now getting log messages!