Quote:
Originally Posted by powah
Is there a way to setup a last known good configuration for some
configuration files?
e.g. /etc/ssh/sshd_config
I want to save some configuration files in case the computer go wrong
and I can restore a good configuration file.
Is Samhain or Aide overkill for my purpose?
or do I write my own program?
|
Often, when editing files, the file which is altered is saved under some variation of the original name, maybe with extensions like .old or with a ~ mark. You can easily save your current, last known good configuration file this way, save it as config.old or config.good if you like, before editing the file in question. You can also use the cp command to make a copy with a different name before you alter the good configuration file. If things go wrong, you can simply use the cp command on the saved config.good file to overwrite the incorrect config.new file.
Hope this helps
http://www.computerhope.com/unix/ucp.htm