Unless you're using some sort of admin panel such as Webmin or cPanel, or a configuration management tool such as Puppet, Ansible or Salt there should be no changes applied to your server configurations from any other source than Debians package manager (dpkg(1)
).
This might happen if you've ran distribution upgrades, or have unattended upgrades enabled in your server. This is generally logged in /var/log/dpkg.log
.
You can override this behavior to make sure there is no configuration changes applied to any of your packages by adding following lines to /etc/apt/apt.conf.d/local.conf
:
Dpkg::Options {
"--force-confdef";
"--force-confold";
}
To give you an overview of these options:
--force-confdef: ask dpkg to decide alone when it can and prompt otherwise. This is the default behavior of dpkg and this option is mainly useful in combination with --force-confold.
--force-confold: do not modify the current configuration file, the new version is installed with a .dpkg-dist suffix. With this option alone, even configuration files that you have not modified are left untouched. You need to combine it with --force-confdef to let dpkg overwrite configuration files that you have not modified.
You can also achieve this with ucf(1)
by adding your configuration to /etc/ucf.conf.
To be able to detect changes to the file you can use inotify
in conjuction with some other commands like lsof
. Let me know if you want further help with that.
Hope this helps!