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 16:24:18 |
Message-ID: | CADJadRAd7=5z9DcoOvDCQKb1Lyi7VHNRBbuVsQ1x398s_isRdw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, May 30, 2018 at 7:45 PM, George Neuner <gneuner2(at)comcast(dot)net> wrote:
> On Tue, 29 May 2018 13:32:46 -0700, Adrian Klaver
> <adrian(dot)klaver(at)aklaver(dot)com> wrote:
>
> >On 05/29/2018 12:14 PM, nageswara Bandla wrote:
> >
> >> As per the link-
> >> (https://www.postgresql.org/docs/9.6/static/libpq-pgpass.html) I set
> >> PGPASSFILE environment variable to point to pgpass.conf location. Even
> >> then, it’s throwing same above error message. I have found out that
> >> pgagent is not reading pgpass.conf file when configured under
> >> LocalSystem account.
> >>
> >> When I change the properties of the pgagent service to run under my
> >> login user account. Then, it’s reading pgpass.conf file under
> >> %APPDATA%/postgresql/pgpass.conf.
> >>
> >> I am clueless, why pgagent is not honoring PGPASSFILE env variable.
> >
> >My guess because the LocalSystem user does not have permissions on your:
> >
> >%APPDATA%/postgresql/pgpass.conf
> >
> >file. This seems to be confirmed by it working when you run pgagent as
> >the login user.
>
> 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.
>
> George
>
>
> >passfile
> >
> > Specifies the name of the file used to store passwords (see Section
> >33.15). Defaults to ~/.pgpass, or %APPDATA%\postgresql\pgpass.conf on
> >Microsoft Windows. (No error is reported if this file does not exist.)
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Federico Di Gregorio | 2018-05-31 16:57:41 | R: Re: License Question |
Previous Message | David G. Johnston | 2018-05-31 15:25:48 | Re: Insert UUID GEN 4 Value |