18.3. Configure the /etc/tw.config file

The /etc/tw.config file is the Tripwire configuration file where you decide and set which system files and directories that you want monitored. Note that extensive testing and experience are necessary when editing this file before you get working file reports. The following is a working example from where you can start you own customization.

  1. Create the tw.config file, touch /etc/tw.config and add in this file all files and directories that you want monitored. The format of the configuration file is described in its header and in the man page tw.config(5):
          # Gerhard Mourani: gmourani@videotron.ca
              # last updated: 1999/11/12 
              #  First, root's "home"
              /root	R
              /	R
              # OS itself
              /boot/vmlinuz	R
              # critical boot resources
              /boot	R
              # Critical directories and files
              /chroot	R
              /etc	R
              /etc/inetd.conf	R
              /etc/nsswitch.conf	R
              /etc/rc.d	R
              /etc/mtab	L
              /etc/motd	L
              /etc/group	R
              /etc/passwd	L
              # other popular filesystems
              /usr	R
              /usr/local	R
              /dev	L-am
              /usr/etc	R
              # truncate home
              =/home	R
              # var tree
              =/var/spool	L
              /var/log	L
              /var/lib	L
              /var/spool/cron	L
              # unusual directories
              =/proc	E

  2. Now, for security reasons, change the mode of this file to be 0600 with the following command:
          [root@deep] /# chmod 600  /etc/tw.config