pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Problem: pg_hba.conf is automatically rewritten every day
8+ messages / 6 participants
[nested] [flat]

* Problem: pg_hba.conf is automatically rewritten every day
@ 2013-05-03 13:45  Nghia Truong <nghiatruong.vn@gmail.com>
  0 siblings, 1 reply; 8+ messages in thread

From: Nghia Truong @ 2013-05-03 13:45 UTC (permalink / raw)
  To: pgsql-admin

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

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Problem: pg_hba.conf is automatically rewritten every day
@ 2013-05-03 14:28  Ray Stell <stellr@vt.edu>
  parent: Nghia Truong <nghiatruong.vn@gmail.com>
  0 siblings, 1 reply; 8+ messages in thread

From: Ray Stell @ 2013-05-03 14:28 UTC (permalink / raw)
  To: Nghia Truong <nghiatruong.vn@gmail.com>; +Cc: pgsql-admin


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.=

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Problem: pg_hba.conf is automatically rewritten every day
@ 2013-05-03 15:52  Johnny Tan <johnnydtan@gmail.com>
  parent: Ray Stell <stellr@vt.edu>
  0 siblings, 1 reply; 8+ messages in thread

From: Johnny Tan @ 2013-05-03 15:52 UTC (permalink / raw)
  To: Ray Stell <stellr@vt.edu>; +Cc: Nghia Truong <nghiatruong.vn@gmail.com>; pgsql-admin

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.
>

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Problem: pg_hba.conf is automatically rewritten every day
@ 2013-05-03 15:59  Nghia Truong <nghiatruong.vn@gmail.com>
  parent: Johnny Tan <johnnydtan@gmail.com>
  0 siblings, 2 replies; 8+ messages in thread

From: Nghia Truong @ 2013-05-03 15:59 UTC (permalink / raw)
  To: Johnny Tan <johnnydtan@gmail.com>; +Cc: Ray Stell <stellr@vt.edu>; pgsql-admin

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.
>>
>
>

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Problem: pg_hba.conf is automatically rewritten every day
@ 2013-05-03 16:08  Jim Mercer <jim@reptiles.org>
  parent: Nghia Truong <nghiatruong.vn@gmail.com>
  1 sibling, 0 replies; 8+ messages in thread

From: Jim Mercer @ 2013-05-03 16:08 UTC (permalink / raw)
  To: Nghia Truong <nghiatruong.vn@gmail.com>; +Cc: Johnny Tan <johnnydtan@gmail.com>; Ray Stell <stellr@vt.edu>; pgsql-admin

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"


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Problem: pg_hba.conf is automatically rewritten every day
@ 2013-05-03 16:13  Fred Parkinson <FredP@abag.ca.gov>
  parent: Nghia Truong <nghiatruong.vn@gmail.com>
  1 sibling, 1 reply; 8+ messages in thread

From: Fred Parkinson @ 2013-05-03 16:13 UTC (permalink / raw)
  To: Johnny Tan <johnnydtan@gmail.com>; Nghia Truong <nghiatruong.vn@gmail.com>; +Cc: pgsql-admin; Ray Stell <stellr@vt.edu>

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.

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Problem: pg_hba.conf is automatically rewritten every day
@ 2013-05-03 16:18  Prashanth Goriparthi <gprashanthkumar@gmail.com>
  parent: Fred Parkinson <FredP@abag.ca.gov>
  0 siblings, 1 reply; 8+ messages in thread

From: Prashanth Goriparthi @ 2013-05-03 16:18 UTC (permalink / raw)
  To: Fred Parkinson <FredP@abag.ca.gov>; +Cc: Johnny Tan <johnnydtan@gmail.com>; Nghia Truong <nghiatruong.vn@gmail.com>; pgsql-admin; Ray Stell <stellr@vt.edu>

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 postgresqlreceived a SIGHUP to reload configuration.
>>>
>>>
>>> Sounds like some sysadmin scripted rsync gone wild.
>>>
>>
>>
>

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Problem: pg_hba.conf is automatically rewritten every day
@ 2013-05-04 00:26  Nghia Truong <nghiatruong.vn@gmail.com>
  parent: Prashanth Goriparthi <gprashanthkumar@gmail.com>
  0 siblings, 0 replies; 8+ messages in thread

From: Nghia Truong @ 2013-05-04 00:26 UTC (permalink / raw)
  To: Prashanth Goriparthi <gprashanthkumar@gmail.com>; +Cc: Fred Parkinson <FredP@abag.ca.gov>; Johnny Tan <johnnydtan@gmail.com>; pgsql-admin; Ray Stell <stellr@vt.edu>

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":
http://forums.cpanel.net/f354/cpanel-update-changed-pg_hba-conf-samerole-338982.html
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.
>>>>
>>>
>>>
>>
>

^ permalink  raw  reply  [nested|flat] 8+ messages in thread


end of thread, other threads:[~2013-05-04 00:26 UTC | newest]

Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-05-03 13:45 Problem: pg_hba.conf is automatically rewritten every day Nghia Truong <nghiatruong.vn@gmail.com>
2013-05-03 14:28 ` Ray Stell <stellr@vt.edu>
2013-05-03 15:52   ` Johnny Tan <johnnydtan@gmail.com>
2013-05-03 15:59     ` Nghia Truong <nghiatruong.vn@gmail.com>
2013-05-03 16:08       ` Jim Mercer <jim@reptiles.org>
2013-05-03 16:13       ` Fred Parkinson <FredP@abag.ca.gov>
2013-05-03 16:18         ` Prashanth Goriparthi <gprashanthkumar@gmail.com>
2013-05-04 00:26           ` Nghia Truong <nghiatruong.vn@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox