D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] /etc/hosts reverted

 

On 03/01/16 12:57, Martijn Grooten wrote:
> On Sun, Jan 03, 2016 at 09:18:30AM +0000, Adrian Midgley wrote:
>> Found my hosts file no longer has lots of 127.0.0.n entries for advertisers.
> 
> I wouldn't know what happened in this particular case, but it has
> happened to me quite a few times that a config file in /etc was reverted
> to the default version or a previous version, because of another
> program that used its own config file and used that to overwrite the
> actual config file.
> 
> It's annoying, but I would assume that rather than malice.
> 
> Martijn.

Yet another reason to use etckeeper to version /etc automatically unless
you're using a snapshotting filesystem or something similar.

/etc/hosts is provided by the debian-installer netcfg package and as
such *shouldn't* be touched by post-install packages so it's unlikely
you missed one of the messages that go like this:

==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.

So you can grep for it but I doubt there will be an /etc/hosts.dpkg-old
as it won't be apt that's clobbered it.

Version or snapshot any mountpoint you care about I guess is the moral
of the story. At least it was only hosts eh, and not sshd_config...

Cheers
-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq