[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How do I trace changes in configuration files?



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Erik Josefsson wrote:
> Den 2019-05-01 kl. 13:29, skrev Dan Purgert:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA256
>>
>> Erik Josefsson wrote:
>>> I'm trying to learn how to set up my two Teres laptops so that they are
>>> identical.
>>>
>>> [...]
>>>
>>> I have tried to document my personal preferences before, but I have
>>> always ended up with unreadable handwritten notes.
>>>
>>> This time I thought I should do it in a more systematic way by somehow
>>> capture the difference between the default install and the result of my
>>> (often irrational) efforts to make my machines look and feel like I want
>>> it to.
>>>
>>> So, is there a way to trace/record/capture changes in all configuration
>>> files?
>>>
>> There are as many as people reading this channel :)
>>
>> Probably the simplest (and, to some extent, most error prone) is to
>> simply make copies, edit only the copies. For example:
>>
>>    cp orig.conf orig.conf.$(date +%y-%m-%d_%H%M%S)
>>    vi orig.conf
>>
>> and then you'll end up with stuff like
>>
>>    orig.conf
>>    orig.19-05-01_065356
>>    orig.19-05-01_104022
>>    (etc)
>>
>> Then just use 'diff' against any two files to see what changed between
>> them.
>
>
> Thanks Dan, I'll start with that method and maybe later I'll try Jonas' 
> proposal with etckeeper and git.
>
> But first, in which top level directories could files that change be 
> located?

Config files live in /etc (global configs, e.g. for sshd or apache, and
so on), or a user's $HOME directory (personal configs, e.g. your
Thunderbird profile)

> [...]
> For now, I just want to see where (and if) my setup is stored (e.g. 
> where does my wifi's SSID and passphrase end up? maybe in more than one 
> place?).

Depends on what tool you're using, probably in a config file under /etc.
On a box I have here running Network Manager, it's

  /etc/NetworkManager/system-connections/${ssid_name}


-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEBcqaUD8uEzVNxUrujhHd8xJ5ooEFAlzJ1BYACgkQjhHd8xJ5
ooFZwQgAkjl0t4+PX3eNNwBm3SXbjGSzckjNmuXQohld7HwJNjcSfeFj2Y57myVi
J/B2bPPh7KT8tMArJifaewWgUrLJ9qRdm3gbbTM+0RGnmd7WGG8/dm+wSygD5pMC
bf3S70Rz1vIFCarvwhsfruJfus6C0zHj2MJkEmbnUZ2Nk/m8t5Ct3dazh2YUm8Bk
MJXtvwUx/U5iog6ViKC5tfbIbV+T/6q/euRbreB3PwfFDDcPX+1qYNwtSWCZd9ai
tl3+gNj7ZXIK2nDdWVMWWKAHYWZUXufAGHMFQbS6yiMHELIhFlm9IKkP6S2g2VW3
KGQoan8jc2WW5Jt6AjatvfmTa752Fw==
=MIre
-----END PGP SIGNATURE-----

-- 
|_|O|_| 
|_|_|O| Github: https://github.com/dpurgert
|O|O|O| PGP: 05CA 9A50 3F2E 1335 4DC5  4AEE 8E11 DDF3 1279 A281


Reply to: