Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am upgrading a fairly old server and I wish to find all of the system config files that I may have previously edited e.g. samba (smb.conf), NFS (exports), networking etc. Bash history can't help with this particular server. I know I've edited some, but can't remember which...

share|improve this question

2 Answers 2

up vote 3 down vote accepted

You can use debsums to do this. From the man page:

debsums is intended primarily as a way of determining what installed files have been locally modified by the administrator...

You will need to install debsums yourself as it is not installed by default.

I found when I tested this that it complained about most packages not having md5 checksums so I ran

sudo checksums_init

This looks for packages that did not install their md5sums files. Then, it will generate those md5sums files from the binary packages downloaded via APT if available.

Once that was completed I ran :

sudo debsums -ce > ~/changed-configs.txt

and that produces a file called changed-configs.txt that lists configuration changes made locally compared to the files provided from the repositories.

I think that should provide what you need.

share|improve this answer
    
That looks like what I'm after. Thanks. –  Frank_Zafka May 23 '12 at 21:07
    
Off topic but just for reference in case anyone uses rpm distros, on rpm based systems you can do rpm -Va to find changes. –  Richard Holloway May 23 '12 at 21:09

If you edited them via the terminal, you could search your bash history. i.e.

grep 'smb.conf' ~/.bash_history

or

grep 'nano' ~/.bash_history

I've done this a few times on a server when I was trying to document what I had done previously. It would be a good idea to back up your bash_history first though.

share|improve this answer
    
Server old. Bash history long gone. Nice idea though. –  Frank_Zafka May 23 '12 at 20:19
    
I would just back up any configs you deem important to the running of the server. Most likely some things in the configs will be changed in newer versions anyway. What I like to do when I create a server is create a folder /var/server_backup, then create symlinks to all config files I change (keeping full paths from root starting at /var/server_backup), then I rsync this daily to a backup. Won't help here, but something to keep in mind moving forward. –  reverendj1 May 23 '12 at 20:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.