Обсуждение: Problem: pg_hba.conf is automatically rewritten every day

Поиск
Список
Период
Сортировка

Problem: pg_hba.conf is automatically rewritten every day

От
Nghia Truong
Дата:
Hi everyone,
Every day, the file pg_hba.conf in my server is rewritten and postgresql received a SIGHUP to reload configuration. The pg_hba.conf content is:

=============================================
.......
......
local samerole all        md5   
host samerole all  127.0.0.1   255.255.255.255   md5   
local all postgres        md5   
host all postgres  127.0.0.1   255.255.255.255   md5  
=============================================

As a result, my application cannot connect remotely to the database on server. I have to manually modify the pg_hba.conf every day. I don't know why that happens? Is there any way to get rid of it?
Thank you very much for your help.


----------------------------------------------------

Nghia T. Truong

RES: Problem: pg_hba.conf is automatically rewritten every day

От
"Marcelo Verissimo"
Дата:

Hi , i dont expert in postrgres , but i'll checked why

This server reload configuration every day ?

after

Set permission the file on the her user  and check the application client , maybe has a new file or instrutions for rewritten

 

may solv !

De: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] Em nome de Nghia Truong
Enviada em: sexta-feira, 3 de maio de 2013 10:45
Para: pgsql-admin@postgresql.org
Assunto: [ADMIN] Problem: pg_hba.conf is automatically rewritten every day

 

Hi everyone,

Every day, the file pg_hba.conf in my server is rewritten and postgresql received a SIGHUP to reload configuration. The pg_hba.conf content is:

 

=============================================

.......

......

local samerole all        md5   

host samerole all  127.0.0.1   255.255.255.255   md5   

local all postgres        md5   

host all postgres  127.0.0.1   255.255.255.255   md5  

=============================================

 

As a result, my application cannot connect remotely to the database on server. I have to manually modify the pg_hba.conf every day. I don't know why that happens? Is there any way to get rid of it?

Thank you very much for your help.

 

 

----------------------------------------------------

Nghia T. Truong

Re: Problem: pg_hba.conf is automatically rewritten every day

От
Ray Stell
Дата:

On May 3, 2013, at 9:45 AM, Nghia Truong wrote:

Hi everyone,
Every day, the file pg_hba.conf in my server is rewritten and postgresql received a SIGHUP to reload configuration. 

Sounds like some sysadmin scripted rsync gone wild.

Re: Problem: pg_hba.conf is automatically rewritten every day

От
Johnny Tan
Дата:
Chef/Puppet?


On Fri, May 3, 2013 at 10:28 AM, Ray Stell <stellr@vt.edu> wrote:

On May 3, 2013, at 9:45 AM, Nghia Truong wrote:

Hi everyone,
Every day, the file pg_hba.conf in my server is rewritten and postgresql received a SIGHUP to reload configuration. 

Sounds like some sysadmin scripted rsync gone wild.

Re: Problem: pg_hba.conf is automatically rewritten every day

От
Nghia Truong
Дата:
Hi all, 
I am the root user (except that my dedicated server is under the control of its company). I don't have any sysadmin script. The problem just suddenly occurs. I don't know why?

----------------------------------------------------

Nghia T. Truong



On Fri, May 3, 2013 at 10:52 PM, Johnny Tan <johnnydtan@gmail.com> wrote:
Chef/Puppet?


On Fri, May 3, 2013 at 10:28 AM, Ray Stell <stellr@vt.edu> wrote:

On May 3, 2013, at 9:45 AM, Nghia Truong wrote:

Hi everyone,
Every day, the file pg_hba.conf in my server is rewritten and postgresql received a SIGHUP to reload configuration. 

Sounds like some sysadmin scripted rsync gone wild.


Re: Problem: pg_hba.conf is automatically rewritten every day

От
Jim Mercer
Дата:
On Fri, May 03, 2013 at 10:59:09PM +0700, Nghia Truong wrote:
> Hi all,
> I am the root user (except that my dedicated server is under the control of
> its company). I don't have any sysadmin script. The problem just suddenly
> occurs. I don't know why?

as best i know, with the standard postgresql installations, there is no
component that modifies the pg_hba.conf file.

from the systems perspective, it is a static config file, like postgresql.conf

some external script/facility/action is updating your pg_hba.conf file,
and that external script/facility/action is likely unique to your environment,
os installation, server management facilities.

if the timestamp of the file is being set to the same time every day, you
might check the following files:
(may or may not be on your system)

/etc/crontab
/etc/cron.d/*
/var/cron/crontab/*
/var/spool/cron/crontab/*

grep for the timestamp in:
/var/log/cron*
/var/log/auth* (remote system automatically doing sysadmin via ssh?)

--jim






>
> ----------------------------------------------------
>
> Nghia T. Truong
>
>
>
> On Fri, May 3, 2013 at 10:52 PM, Johnny Tan <johnnydtan@gmail.com> wrote:
>
> > Chef/Puppet?
> >
> >
> > On Fri, May 3, 2013 at 10:28 AM, Ray Stell <stellr@vt.edu> wrote:
> >
> >>
> >> On May 3, 2013, at 9:45 AM, Nghia Truong wrote:
> >>
> >> Hi everyone,
> >> Every day, the file pg_hba.conf in my server is rewritten and postgresql received
> >> a SIGHUP to reload configuration.
> >>
> >>
> >> Sounds like some sysadmin scripted rsync gone wild.
> >>
> >
> >

--
Jim Mercer     Reptilian Research      jim@reptiles.org    +1 416 410-5633
"He who dies with the most toys is nonetheless dead"


Re: Problem: pg_hba.conf is automatically rewritten every day

От
"Fred Parkinson"
Дата:
Would it make sense to make the file read-only and see if a write error pops up somewhere?
 
Fred

>>> Nghia Truong <nghiatruong.vn@gmail.com> 05/03/2013 8:59 AM >>>
Hi all,
I am the root user (except that my dedicated server is under the control of its company). I don't have any sysadmin script. The problem just suddenly occurs. I don't know why?

----------------------------------------------------

Nghia T. Truong



On Fri, May 3, 2013 at 10:52 PM, Johnny Tan <johnnydtan@gmail.com> wrote:
Chef/Puppet?


On Fri, May 3, 2013 at 10:28 AM, Ray Stell <stellr@vt.edu> wrote:

On May 3, 2013, at 9:45 AM, Nghia Truong wrote:

Hi everyone,
Every day, the file pg_hba.conf in my server is rewritten and postgresql received a SIGHUP to reload configuration.

Sounds like some sysadmin scripted rsync gone wild.


Re: Problem: pg_hba.conf is automatically rewritten every day

От
Prashanth Goriparthi
Дата:
Look at the timestamp of when this file [pg_hba.conf] is updated and see if there is any correlation to system messages [/var/log/messages or equivalent of your kernel].

Thanking you,
Prashanth Kumar Goriparthi
Mobile : 312 316 4396


On Fri, May 3, 2013 at 10:13 AM, Fred Parkinson <FredP@abag.ca.gov> wrote:
Would it make sense to make the file read-only and see if a write error pops up somewhere?
 
Fred

>>> Nghia Truong <nghiatruong.vn@gmail.com> 05/03/2013 8:59 AM >>>
Hi all,
I am the root user (except that my dedicated server is under the control of its company). I don't have any sysadmin script. The problem just suddenly occurs. I don't know why?

----------------------------------------------------

Nghia T. Truong



On Fri, May 3, 2013 at 10:52 PM, Johnny Tan <johnnydtan@gmail.com> wrote:
Chef/Puppet?


On Fri, May 3, 2013 at 10:28 AM, Ray Stell <stellr@vt.edu> wrote:

On May 3, 2013, at 9:45 AM, Nghia Truong wrote:

Hi everyone,
Every day, the file pg_hba.conf in my server is rewritten and postgresql received a SIGHUP to reload configuration.

Sounds like some sysadmin scripted rsync gone wild.



Re: Problem: pg_hba.conf is automatically rewritten every day

От
Nghia Truong
Дата:
Hello,
I have found the reason. It is due to an update of cpanel. According to its author, to "automatically secures the pg_hba.conf file":
Thank you very much.

----------------------------------------------------

Nghia T. Truong



On Fri, May 3, 2013 at 11:18 PM, Prashanth Goriparthi <gprashanthkumar@gmail.com> wrote:
Look at the timestamp of when this file [pg_hba.conf] is updated and see if there is any correlation to system messages [/var/log/messages or equivalent of your kernel].

Thanking you,
Prashanth Kumar Goriparthi
Mobile : 312 316 4396


On Fri, May 3, 2013 at 10:13 AM, Fred Parkinson <FredP@abag.ca.gov> wrote:
Would it make sense to make the file read-only and see if a write error pops up somewhere?
 
Fred

>>> Nghia Truong <nghiatruong.vn@gmail.com> 05/03/2013 8:59 AM >>>
Hi all,
I am the root user (except that my dedicated server is under the control of its company). I don't have any sysadmin script. The problem just suddenly occurs. I don't know why?

----------------------------------------------------

Nghia T. Truong



On Fri, May 3, 2013 at 10:52 PM, Johnny Tan <johnnydtan@gmail.com> wrote:
Chef/Puppet?


On Fri, May 3, 2013 at 10:28 AM, Ray Stell <stellr@vt.edu> wrote:

On May 3, 2013, at 9:45 AM, Nghia Truong wrote:

Hi everyone,
Every day, the file pg_hba.conf in my server is rewritten and postgresql received a SIGHUP to reload configuration.

Sounds like some sysadmin scripted rsync gone wild.