bdcbfe139f4e73cb05445f902b0d426a2ac002e2
[mirror/dsa-puppet.git] / modules / samhain / templates / samhainrc.erb
1 ##
2 ## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
3 ## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
4 ##
5
6 #####################################################################
7 #
8 # Configuration file template for samhain.
9 #
10 #####################################################################
11
12 # -- empty lines and lines starting with '#', ';' or '//' are ignored
13 # -- boolean options can be Yes/No or True/False or 1/0 
14 # -- you can PGP clearsign this file -- samhain will check (if compiled
15 #    with support) or otherwise ignore the signature
16 # -- CHECK mail address
17 #
18 # To each log facility, you can assign a threshold severity. Only
19 # reports with at least the threshold severity will be logged
20 # to the respective facility (even further below).
21 #
22 #####################################################################
23 #
24 # SETUP for file system checking:
25
26 # (i)   There are several policies, each has its own section. Put files
27 #       into the section for the appropriate policy (see below).
28 # (ii)  Section [EventSeverity]: 
29 #       To each policy, you can assign a severity (further below).
30 # (iii) Section [Log]: 
31 #       To each log facility, you can assign a threshold severity. Only
32 #       reports with at least the threshold severity will be logged
33 #       to the respective facility (even further below).
34 #
35 #####################################################################
36
37 #####################################################################
38 #
39 # Files are defined with: file = /absolute/path
40 #
41 # Directories are defined with:                  dir = /absolute/path
42 # or with an optional recursion depth (N <= 99): dir = N/absolute/path
43 #
44 # Directory inodes are checked. If you only want to check files
45 # in a directory, but not the directory inode itself, use (e.g.):
46 #
47 # [ReadOnly]
48 # dir = /some/directory
49 # [IgnoreAll]
50 # file = /some/directory
51 #
52 # You can use shell-style globbing patterns, like: file = /path/foo*
53
54 ######################################################################
55
56 [Misc]
57 ##
58 ## Add or subtract tests from the policies
59 ## - if you want to change their definitions,
60 ##   you need to do that before using the policies
61 ##
62 # RedefReadOnly = (no default)
63 # RedefAttributes=(no default)
64 # RedefLogFiles=(no default)
65 # RedefGrowingLogFiles=(no default)
66 # RedefIgnoreAll=(no default)
67 # RedefIgnoreNone=(no default)
68 # RedefUser0=(no default)
69 # RedefUser1=(no default)
70 IgnoreMissing=/etc/lvm/archive/.*.vg
71 IgnoreMissing=/var/lib/puppet/clientbucket/.*
72
73 [Attributes]
74 ##
75 ## for these files, only changes in permissions and ownership are checked
76 ##
77 file=/etc/mtab
78 file=/etc/ssh_random_seed
79 file=/etc/asound.conf
80 file=/etc/bacula/bacula-fd.conf
81 file=/etc/localtime
82 file=/etc/ioctl.save
83 file=/etc/passwd.backup
84 file=/etc/shadow.backup
85 file=/etc/postfix/prng_exch
86 file=/etc/adjtime
87 file=/etc/lvm/.cache
88 file=/etc/lvm/cache
89 file=/etc/lvm/cache/.cache
90 file=/etc/network/run/ifstate
91 file=/var/state/samhain/samhain_file
92 file=/etc/bind/zones/db.debian.net
93 file=/etc/exim4/bsmtp
94 file=/etc/fake-hwclock.data
95 <% if classes.include?("named::geodns") -%>
96 file=/etc/bind
97 file=/etc/bind/named.conf.acl
98 file=/etc/bind/named.conf.local
99 file=/etc/bind/geodns/named.conf.geo
100 file=/etc/bind/geodns/recvconf.files
101 <% end -%>
102 <% if classes.include?("named") -%>
103 file=/etc/bind/named.conf.options
104 <% end -%>
105 file=/etc/apache2/conf.d/puppet-builddlist
106 <% if classes.include?("roles::static_mirror") -%>
107 file=/etc/apache2/sites-available/static-vhosts-simple
108 file=/etc/static-clients.conf
109 <% elsif classes.include?("roles::static_master") -%>
110 file=/etc/static-clients.conf
111 <% elsif classes.include?("roles::static_source") -%>
112 file=/etc/static-clients.conf
113 <% end -%>
114 <% if classes.include?("apache2") -%>
115 file=/etc/apache2/conf-available/puppet-ssl-key-pins.conf
116 <% end -%>
117 file=/etc/multipath/wwids
118 <%- if has_variable?("bgpd") && @bgpd -%>
119 file=/etc/quagga/bgpd.conf
120 <% end -%>
121 <%- if has_variable?("zebra") && @zebra -%>
122 file=/etc/quagga/zebra.conf
123 <% end -%>
124
125 #
126 # There are files in /etc that might change, thus changing the directory
127 # timestamps. Put it here as 'file', and in the ReadOnly section as 'dir'.
128 #
129 file=/etc
130 file=/etc/ssh
131 file=/etc/network/run
132 file=/etc/bind/zones
133 file=/etc/spamassassin/sa-update-keys
134 file=/etc/init.d/.depend.boot
135 file=/etc/init.d/.depend.start
136 file=/etc/init.d/.depend.stop
137
138 # These are the directories for the files we handle with puppet
139 <% if classes.include?("apache2") -%>
140 file=/etc/apache2/conf-available
141 files=/etc/apache2/mods-enabled
142 files=/etc/apache2/sites-available
143 <% end -%>
144 file=/etc/bacula
145 file=/etc/samhain
146 file=/etc/munin
147 file=/etc/munin/plugins
148 file=/etc/munin/plugin-conf.d
149 file=/etc/munin/munin-conf.d
150 file=/etc/exim4
151 file=/etc/exim4/ssl
152 file=/etc/apt
153 file=/etc/apt/apt.conf.d
154 file=/etc/apt/sources.list.d
155 file=/etc/apt/preferences.d
156 file=/etc/default
157 file=/etc/logrotate.d
158 file=/etc/nagios
159 file=/etc/nagios/nrpe.d
160 file=/etc/nagios/obsolete-packages-ignore.d
161 file=/etc/bind/geodns
162 <% if scope.function_has_role(['nagiosmaster']) -%>
163 file=/etc/nagios3/puppetconf.d
164 <% end -%>
165 file=/etc/puppet
166 file=/etc/cron.d
167 file=/etc/cron.weekly
168 file=/usr/lib/nagios/plugins
169 file=/usr/sbin
170 file=/etc/monit
171 file=/etc/monit/monit.d
172 file=/etc/pam.d
173 file=/etc/schroot/default
174 file=/etc/schroot/setup.d
175 file=/etc/sysctl.d
176 file=/etc/syslog-ng
177 file=/etc/stunnel
178 file=/etc/ferm/
179 file=/etc/ferm/conf.d
180 file=/etc/ferm/dsa.d
181 file=/etc/rc.local
182 file=/etc/unbound
183 file=/etc/dsa
184 file=/etc/rabbitmq
185 <% if scope.function_has_role(['static_mirror']) or scope.function_has_role(['static_source']) or scope.function_has_role(['static_master']) -%>
186 file=/etc/ssh/userkeys
187 file=/etc/ssh/userkeys/staticsync
188 <% end -%>
189 <% if scope.function_has_role(['ssh.upload.d.o']) -%>
190 file=/etc/ssh/userkeys/buildd-uploader
191 <% end -%>
192 <% if scope.function_has_role(['buildd_master']) -%>
193 file=/etc/ssh/userkeys/wb-buildd.more
194 <% end -%>
195 file=/etc/rsyncd
196 <%- if @hostname == "sibelius" then -%>
197 file=/etc/tsm
198 file=/etc/tsm/TSM.PWD
199 <% end -%>
200 file=/etc/ssl/private
201
202
203 [LogFiles]
204 ##
205 ## for these files, changes in signature, timestamps, and size are ignored 
206 ##
207 file=/etc/motd
208
209 # is on tmpfs, ignore.
210 #file=/var/run/utmp
211
212
213 #####################################################################
214 #
215 # This would be the proper syntax for parts that should only be
216 #    included for certain hosts.
217 # You may enclose anything in a @HOSTNAME/@end bracket, as long as the
218 #    result still has the proper syntax for the config file.
219 # You may have any number of @HOSTNAME/@end brackets.
220 # HOSTNAME should be the fully qualified 'official' name 
221 #    (e.g. 'nixon.watergate.com', not 'nixon'), no aliases. 
222 #    No IP number - except if samhain cannot determine the 
223 #    fully qualified hostname.
224 #
225 # @HOSTNAME
226 # file=/foo/bar
227 # @end
228 #
229 # These are two examples for conditional inclusion/exclusion
230 # of a machine based on the output from 'uname -srm'
231 #
232 # $Linux:2.*.7:i666
233 # file=/foo/bar3
234 # $end
235 #
236 # !$Linux:2.*.7:i686
237 # file=/foo/bar2
238 # $end
239 #
240 #####################################################################
241
242 [GrowingLogFiles]
243 ##
244 ## for these files, changes in signature, timestamps, and increase in size
245 ##                  are ignored 
246 ##
247 file=/var/log/warn
248 file=/var/log/messages
249 file=/var/log/wtmp
250 file=/var/log/faillog
251 file=/var/log/auth.log
252 file=/var/log/daemon.log
253 file=/var/log/user.log
254 file=/var/log/kern.log
255 file=/var/log/syslog
256
257
258 [IgnoreAll]
259 dir=-1/srv
260 ##
261 ## for these files, no modifications are reported
262 ##
263 ## This file might be created or removed by the system sometimes.
264 ##
265 file=/etc/resolv.conf
266 <% if scope.lookupvar('site::nodeinfo')['buildd'] -%>
267 file=/etc/dupload.conf
268 file=/etc/buildd/buildd.conf
269 file=/etc/sbuild/sbuild.conf
270 <% end -%>
271 file=/etc/resolv.conf.pcmcia.save
272 file=/etc/nologin
273 file=/etc/postfix/debian.db
274 file=/etc/postfix/debian
275 file=/etc/ssh/ssh_known_hosts
276 file=/etc/ssh/ssh-rsa-shadow
277 file=/var/lib/misc/ssh-rsa-shadow
278 file=/etc/.da-backup.trace
279 file=/etc/postfix/debianhosts
280 file=/etc/postfix/debianhosts.db
281 file=/etc/blkid.tab
282 file=/etc/blkid.tab.old
283 file=/etc/resolv.conf.dhclient-new
284
285 # We handle these files with puppet - please to not be bothering us
286 file=/etc/dsa/pubsub.conf
287 file=/etc/nsswitch.conf
288 file=/etc/timezone
289 file=/etc/motd.tail
290 file=/etc/update-motd.d/
291 file=/etc/update-motd.d/puppet-motd
292 file=/etc/ntp.conf
293 file=/etc/samhain/samhainrc
294 file=/etc/munin/munin-node.conf
295 file=/etc/munin/plugin-conf.d/munin-node
296 dir=2/etc/munin/munin-conf.d
297 file=/etc/userdir-ldap.confc
298 file=/etc/exim4/blacklist
299 file=/etc/exim4/host_blacklist
300 file=/etc/exim4/callout_users
301 file=/etc/exim4/exim4.conf
302 file=/etc/exim4/grey_users
303 file=/etc/exim4/helo-check
304 file=/etc/exim4/locals
305 file=/etc/exim4/localusers
306 file=/etc/exim4/manualroute
307 file=/etc/exim4/rbllist
308 file=/etc/exim4/rhsbllist
309 file=/etc/exim4/submission-domains
310 file=/etc/exim4/virtualdomains
311 file=/etc/exim4/email-virtualdomains
312 file=/etc/exim4/whitelist
313 file=/etc/exim4/local-settings.conf
314 file=/etc/exim4/ssl/ca.crt
315 file=/etc/exim4/ssl/ca.crl
316 file=/etc/exim4/ssl/thishost.crt
317 file=/etc/exim4/ssl/thishost.key
318 dir=3/etc/exim4/email-virtualdomains
319 file=/etc/ssh/ssh_config
320 file=/etc/ssh/sshd_config
321 file=/etc/dsa/cron.ignore.dsa-puppet-stuff
322 file=/etc/vsftpd.conf
323 file=/etc/aliases
324 file=/etc/multipath.conf
325 file=/etc/static-components.conf
326 file=/etc/rabbitmq/rabbitmq.config
327 file=/etc/rabbitmq/enabled_plugins
328 dir=/etc/bacula/storages-list.d
329 dir=/etc/bacula/storage-conf.d
330 dir=/etc/bacula/conf.d
331 <%=
332 out=""
333 if scope.lookupvar('site::nodeinfo')['heavy_exim']
334   out = '
335 file=/etc/exim4/surbl_whitelist.txt
336 file=/etc/exim4/exim_surbl.pl
337 file=/etc/exim4/ccTLD.txt
338 file=/etc/clamav-unofficial-sigs.conf
339 file=/etc/clamav-unofficial-sigs.dsa.conf
340 '
341 end
342 out
343 %>
344 file=/etc/munin/plugins/bind
345 file=/etc/munin/plugins/bind_views
346 file=/etc/munin/plugins/cpu
347 file=/etc/munin/plugins/df
348 file=/etc/munin/plugins/df_abs
349 file=/etc/munin/plugins/df_inode
350 file=/etc/munin/plugins/entropy
351 file=/etc/munin/plugins/forks
352 file=/etc/munin/plugins/interrupts
353 file=/etc/munin/plugins/iostat
354 file=/etc/munin/plugins/irqstats
355 file=/etc/munin/plugins/load
356 file=/etc/munin/plugins/memory
357 file=/etc/munin/plugins/ntp_offset
358 file=/etc/munin/plugins/ntp_states
359 file=/etc/munin/plugins/open_files
360 file=/etc/munin/plugins/open_inodes
361 file=/etc/munin/plugins/processes
362 file=/etc/munin/plugins/ps_apache2
363 file=/etc/munin/plugins/ps_exim4
364 file=/etc/munin/plugins/ps_vsftpd
365 file=/etc/munin/plugins/spamassassin
366 file=/etc/munin/plugins/swap
367 file=/etc/munin/plugins/uptime
368 file=/etc/munin/plugins/vmstat
369 file=/etc/munin/plugins/vfstpd
370 file=/etc/munin/plugins/apache_accesses
371 file=/etc/munin/plugins/apache_processes
372 file=/etc/munin/plugins/apache_volume
373 file=/etc/munin/plugins/apache_servers
374 file=/etc/munin/plugins/exim_mailqueue
375 file=/etc/munin/plugins/exim_mailstats
376 file=/etc/munin/plugins/postfix_mailqueue
377 file=/etc/munin/plugins/postfix_mailvolume
378 file=/etc/apache2/conf.d/resource-limits
379 file=/etc/apache2/mods-enabled/info.conf
380 file=/etc/apache2/mods-enabled/info.load
381 file=/etc/apache2/mods-enabled/server.conf
382 file=/etc/apache2/mods-enabled/server.load
383 file=/etc/apache2/conf.d/server-status
384 file=/etc/apache2/conf.d/local-serverinfo
385 file=/etc/apache2/sites-available/www.debian.org
386 file=/etc/apt/preferences
387 file=/etc/apt/sources.list.d/volatile.list
388 file=/etc/apt/sources.list.d/security.list
389 file=/etc/apt/sources.list.d/buildd.list
390 file=/etc/apt/sources.list.d/buildd.debian.org.list
391 file=/etc/apt/sources.list.d/buildd.debian.org-proposed.list
392 file=/etc/apt/sources.list.d/buildd.debian.org-experimental.list
393 file=/etc/apt/sources.list.d/geoip.list
394 file=/etc/apt/sources.list.d/backports.debian.org.list
395 file=/etc/apt/sources.list.d/debian.org.list
396 file=/etc/apt/sources.list.d/db.debian.org.list
397 file=/etc/apt/sources.list.d/debian.restricted.list
398 file=/etc/apt/sources.list.d/debian.list
399 file=/etc/apt/sources.list.d/backports.org.list
400 file=/etc/apt/apt.conf.d/local-compression
401 file=/etc/apt/apt.conf.d/local-recommends
402 file=/etc/apt/apt.conf.d/local-pdiffs
403 file=/etc/apt/apt.conf.d/local-ssl-ca-global
404 file=/etc/apt/preferences.d/buildd
405 file=/etc/puppet/puppet.conf
406 file=/etc/default/puppet
407 file=/etc/default/postgrey
408 file=/etc/default/syslog-ng
409 file=/etc/logrotate.d/exim4-paniclog
410 file=/etc/logrotate.d/exim4-base
411 file=/etc/logrotate.d/syslog-ng
412 file=/etc/syslog-ng/syslog-ng.conf
413 file=/usr/sbin/dsa-update-apt-status
414 file=/usr/sbin/dsa-update-samhain-status
415 file=/etc/nagios/nrpe.d/nrpe_dsa.cfg
416 file=/etc/nagios/nrpe.d/debianorg.cfg
417 file=/etc/nagios/obsolete-packages-ignore
418 file=/etc/nagios/obsolete-packages-ignore.d/hostspecific
419 file=/etc/nagios/check-libs.conf
420 file=/usr/lib/nagios/plugins/dsa-check-packages
421 file=/usr/lib/nagios/plugins/dsa-check-soas
422 file=/usr/lib/nagios/plugins/dsa-check-mirrorsync
423 file=/usr/lib/nagios/plugins/dsa-check-samhain
424 file=/usr/lib/nagios/plugins/dsa-check-statusfile
425 file=/usr/lib/nagios/plugins/dsa-check-dabackup-server
426 file=/usr/lib/nagios/plugins/dsa-check-config
427 file=/usr/lib/nagios/plugins/dsa-check-hpacucli
428 file=/usr/lib/nagios/plugins/dsa-check-raid-mpt
429 file=/usr/lib/nagios/plugins/dsa-check-puppet
430 file=/usr/lib/nagios/plugins/dsa-check-running-kernel
431 file=/usr/lib/nagios/plugins/dsa-check-raid-3ware
432 file=/usr/lib/nagios/plugins/dsa-check-dabackup
433 file=/usr/lib/nagios/plugins/dsa-check-raid-dac960
434 file=/usr/lib/nagios/plugins/dsa-check-udldap-freshness
435 file=/usr/lib/nagios/plugins/dsa-check-raid-areca
436 file=/usr/lib/nagios/plugins/dsa-check-raid-sw
437 file=/usr/lib/nagios/plugins/dsa-update-samhain-status
438 file=/etc/sudoers
439 file=/etc/stunnel/puppet-ekeyd-peer.pem
440 file=/etc/stunnel/puppet-ekeyd.conf
441 file=/etc/pam.d/sudo
442 file=/etc/monit/monitrc
443 file=/etc/monit/monit.d/01puppet
444 file=/etc/monit/monit.d/00debian.org
445 file=/etc/cron.d/dsa-puppet-stuff
446 file=/etc/cron.weekly/stunnel-ekey-restart
447 file=/etc/default/schroot
448 file=/etc/schroot/default/nssdatabases
449 file=/etc/schroot/setup.d/99builddsourceslist
450 file=/etc/schroot/setup.d/99porterbox-extra-sources
451 file=/etc/schroot/setup.d/99porterbox-extra-apt-options
452 file=/etc/openvswitch/conf.db
453
454 <% if scope.function_has_role(['nagiosmaster']) -%>
455 file=/etc/nagios3/puppetconf.d/auto-hostgroups.cfg
456 file=/etc/nagios3/puppetconf.d/auto-hosts.cfg
457 file=/etc/nagios3/puppetconf.d/auto-services.cfg
458 file=/etc/nagios3/puppetconf.d/auto-dependencies.cfg
459 file=/etc/nagios3/puppetconf.d/auto-hostextinfo.cfg
460 file=/etc/nagios3/puppetconf.d/auto-serviceextinfo.cfg
461 file=/etc/nagios3/puppetconf.d/auto-servicegroups.cfg
462 file=/etc/nagios3/puppetconf.d/contacts.cfg
463 <% end -%>
464 <% if scope.function_has_role(['muninmaster']) -%>
465 file=/etc/munin/munin.conf
466 <% end -%>
467 <% if scope.function_has_role(['puppetmaster']) -%>
468 dir=8/etc/puppet
469 <% end -%>  
470 <% if classes.include?('named::geodns') -%>
471 dir=1/etc/bind/geodns
472 <% end -%>
473 <% if classes.include?('named::authoritative') -%>
474 dir=1/etc/bind
475 file=/etc/bind/named.conf.debian-zones
476 <% end -%>
477 dir=3/etc/lvm/archive
478 dir=3/etc/lvm/backup
479 dir=1/etc/ferm/dsa.d
480 dir=1/etc/ferm/conf.d
481 dir=3/etc/facter
482 file=/etc/ferm/conf.d/me.conf
483 file=/etc/ferm/conf.d/defs.conf
484 file=/etc/ferm/ferm.conf
485 file=/etc/ssl/README
486 dir=2/etc/ssl/debian
487 dir=1/etc/ssl/certs
488 dir=1/etc/ssl/ca-debian
489 dir=1/etc/ssl/ca-global
490 file=/etc/ca-certificates.conf
491 file=/etc/ca-certificates-debian.conf
492 file=/etc/ca-certificates-global.conf
493 file=/etc/ssl/private/ssl-cert-snakeoil.key
494 file=/etc/unbound/unbound.conf
495 <% if scope.lookupvar('::fqdn') == "draghi.debian.org" -%>
496 file=/etc/openvpn/deb-mgmt-clients.pool
497 <% end -%>
498 file=/etc/rsyncd/debian.secrets
499
500
501 <% if scope.function_has_role(['puppetmaster']) %>
502
503 # Damn you rails apps and your shoddy packaging
504 file=/usr/share/puppet-dashboard/public/stylesheets
505 file=/usr/share/puppet-dashboard/public/javascripts
506 file=/usr/share/puppet-dashboard/public/stylesheets/all.css
507 file=/usr/share/puppet-dashboard/public/javascripts/all.js
508 dir=1/usr/share/puppet-dashboard/tmp/pids
509 <% end -%>
510
511 <% if classes.include?("porterbox") %>
512 file=/etc/cron.weekly/puppet-mail-big-homedirs
513 <% end -%>
514 file=/etc/ssl/private/*.key-certchain
515 dir=10/var/lib/puppet/clientbucket
516
517 [IgnoreNone]
518 ##
519 ## for these files, all modifications (even access time) are reported
520 ##    - you may create some interesting-looking file (like /etc/safe_passwd),
521 ##      just to watch whether someone will access it ...
522 ##
523
524 [Prelink]
525 ##
526 ## Use for prelinked files or directories holding them
527 ##
528
529
530 [ReadOnly]
531 ##
532 ## for these files, only access time is ignored
533 ##
534 dir=/usr/bin
535 dir=/bin
536 dir=/boot
537 #
538 # SuSE (old) has the boot init scripts in /sbin/init.d/*, 
539 # so we go 3 levels deep
540 #
541 dir=3/sbin
542 dir=/usr/sbin
543 dir=/lib
544 dir=3/usr/lib
545 dir=3/usr/share
546 #
547 # RedHat and Debian have the bootinit scripts in /etc/init.d/* or /etc/rc.d/*, 
548 #        so we go 3 levels deep there too
549 #
550 dir=3/etc
551
552 # Various directories / files that may include / be SUID/SGID binaries
553 #
554 #
555 file=/usr/lib/pt_chown
556 # X11, in Debian X7 this is now a symlink
557 #dir=/usr/X11R6/bin
558 #dir=/usr/X11R6/lib/X11/xmcd/bin
559 # Apache:
560 #file=/usr/lib/apache/suexec
561 #file=/usr/lib/apache/suexec.disabled
562 # Extra directories:
563 #dir=/opt/gnome/bin
564 #dir=/opt/kde/bin
565
566 [User0]
567 [User1]
568 ## User0 and User1 are sections for files/dirs with user-definable checking
569 ## (see the manual) 
570
571
572 [EventSeverity]
573 ##
574 ## Here you can assign severities to policy violations.
575 ## If this severity exceeds the treshold of a log facility (see below),
576 ## a policy violation will be logged to that facility.
577 ##
578 ## Severity for verification failures.
579 ##
580 # SeverityReadOnly=crit
581 # SeverityLogFiles=crit
582 # SeverityGrowingLogs=crit
583 # SeverityIgnoreNone=crit
584 # SeverityAttributes=crit
585 # SeverityUser0=crit
586 # SeverityUser1=crit
587
588 # Default behaviour
589 SeverityReadOnly=crit
590 SeverityLogFiles=crit
591 SeverityGrowingLogs=warn
592 SeverityIgnoreNone=crit
593 SeverityAttributes=crit
594
595
596 ##
597 ## We have a file in IgnoreAll that might or might not be present.
598 ## Setting the severity to 'info' prevents messages about deleted/new file.
599 ##
600 # SeverityIgnoreAll=crit
601 SeverityIgnoreAll=info
602
603 ## Files : file access problems
604 # SeverityFiles=crit
605
606 ## Dirs  : directory access problems
607 # SeverityDirs=crit
608
609 ## Names : suspect (non-printable) characters in a pathname
610 # SeverityNames=crit
611
612 # Default behaviour
613 SeverityFiles=crit
614 SeverityDirs=crit
615 SeverityNames=warn
616
617
618 [Log]
619 ##
620 ## Switch on/OFF log facilities and set their threshold severity
621 ##
622 ## Values: debug, info, notice, warn, mark, err, crit, alert, none.
623 ## 'mark' is used for timestamps.
624 ##
625 ##
626 ## Use 'none' to SWITCH OFF a log facility
627 ## 
628 ## By default, everything equal to and above the threshold is logged.
629 ## The specifiers '*', '!', and '=' are interpreted as  
630 ## 'all', 'all but', and 'only', respectively (like syslogd(8) does, 
631 ## at least on Linux). Examples:
632 ## MailSeverity=*
633 ## MailSeverity=!warn
634 ## MailSeverity==crit
635
636 ## E-mail
637 ##
638 # MailSeverity=none
639
640 ## Console
641 ##
642 # PrintSeverity=info
643
644 ## Logfile
645 ##
646 # LogSeverity=mark
647
648 ## Syslog
649 ##
650 # SyslogSeverity=none
651
652 ## Remote server (yule)
653 ##
654 # ExportSeverity=none
655
656 ## External script or program
657 ##
658 # ExternalSeverity = none
659
660 ## Logging to a database
661 ##
662 # DatabaseSeverity = none
663
664 # Default behaviour
665 MailSeverity=crit
666 PrintSeverity=none
667 LogSeverity=info
668 SyslogSeverity=alert
669 #ExportSeverity=none
670
671
672
673
674
675 #####################################################
676 #
677 # Optional modules
678 #
679 #####################################################
680
681 [SuidCheck]
682 ##
683 ## --- Check the filesystem for SUID/SGID binaries
684 ## 
685
686 ## Switch off
687 #
688 SuidCheckActive = 0
689
690 ## Interval for check (seconds)
691 #
692 # SuidCheckInterval = 7200
693
694 ## Alternative: crontab-like schedule
695 #
696 # SuidCheckSchedule = NULL
697  
698 ## Directory to exclude 
699 #
700 # SuidCheckExclude = NULL
701
702 ## Limit on files per second (0 == no limit)
703 #
704 # SuidCheckFps = 0
705
706 ## Alternative: yield after every file
707 #
708 # SuidCheckYield = no
709
710 ## Severity of a detection
711 #
712 # SeveritySuidCheck = crit
713
714 ## Quarantine SUID/SGID files if found
715 #
716 # SuidCheckQuarantineFiles = yes
717
718 ## Method for Quarantining files:
719 #  0 - Delete or truncate the file.
720 #  1 - Remove SUID/SGID permissions from file.
721 #  2 - Move SUID/SGID file to quarantine dir.
722 #
723 # SuidCheckQuarantineMethod = 0
724
725 ## For method 1 and 3, really delete instead of truncating
726
727 # SuidCheckQuarantineDelete = yes
728
729 # [Kernel]
730 ##
731 ## --- Check for loadable kernel module rootkits (Linux/FreeBSD only) 
732 ##
733
734 ## Switch on/off
735 #
736 #KernelCheckActive = True
737
738 ## Check interval (seconds); btw., the check is VERY fast
739 #
740 # KernelCheckInterval = 300
741
742 ## Severity
743 #
744 # SeverityKernel = crit
745
746
747 # [Utmp]
748 ##
749 ## --- Logging of login/logout events
750 ##
751
752 ## Switch on/off
753 #
754 # LoginCheckActive = True
755
756 ## Severity for logins, multiple logins, logouts
757
758 # SeverityLogin=info
759 # SeverityLoginMulti=warn
760 # SeverityLogout=info
761
762 ## Interval for login/logout checks
763 #
764 # LoginCheckInterval = 300
765
766
767 # [Database]
768 ##
769 ## --- Logging to a relational database
770 ##
771
772 ## Database name
773 #
774 # SetDBName = samhain
775
776 ## Database table
777 #
778 # SetDBTable = log
779
780 ## Database user
781 #
782 # SetDBUser = samhain
783
784 ## Database password
785 #
786 # SetDBPassword = (default: none)
787
788 ## Database host
789 #
790 # SetDBHost = localhost
791
792 ## Log the server timestamp for received messages
793 #
794 # SetDBServerTstamp = True
795
796 ## Use a persistent connection
797 #
798 # UsePersistent = True
799
800 # [External]
801 ##
802 ## Interface to call external scripts/programs for logging
803 ##
804
805 ## The absolute path to the command
806 ## - Each invocation of this directive will end the definition of the
807 ##   preceding command, and start the definition of 
808 ##   an additional, new command
809 #
810 # OpenCommand = (no default)
811
812 ## Type (log or rv)
813 ## - log for log messages, srv for messages received by the server
814 #
815 # SetType = log
816
817 ## The command (full command line) to execute
818 #
819 # SetCommandLine = (no default)
820
821 ## The environment (KEY=value; repeat for more)
822 #
823 # SetEnviron = TZ=(your timezone)
824
825 ## The TIGER192 checksum (optional)
826 #
827 # SetChecksum = (no default)
828
829 ## User who runs the command
830 #
831 # SetCredentials = (default: samhain process uid)
832
833 ## Words not allowed in message
834 #
835 # SetFilterNot = (none)
836
837 ## Words required (ALL of them)
838 #
839 # SetFilterAnd = (none)
840
841 ## Words required (at least one)
842 #
843 # SetFilterOr = (none)
844
845 ## Deadtime between consecutive calls
846 #
847 # SetDeadtime = 0
848
849 ## Add default environment (HOME, PATH, SHELL)
850 #
851 # SetDefault = no
852
853 <% if scope.call_function('versioncmp', [@lsbmajdistrelease, '9']) >= 0 -%>
854 [PortCheck]
855 PortCheckActive=0
856 <% end -%>
857
858
859 #####################################################
860 #
861 # Miscellaneous configuration options
862 #
863 #####################################################
864
865 [Misc]
866
867 ## whether to become a daemon process
868 ## (this is not honoured on database initialisation)
869 #
870 # Daemon = no
871 Daemon = yes
872
873 ## whether to test signature of files (init/check/none)
874 ## - if 'none', then we have to decide this on the command line -
875 #
876 # ChecksumTest = none
877 ChecksumTest=check
878
879 ## whether to drop linux capabilities that are not required
880 ## - will make a root process a 'mere mortal' in many respects
881 #
882 # UseCaps = yes
883
884 ## Set nice level (-19 to 19, see 'man nice'),
885 ## and I/O limit (kilobytes per second; 0 == off)
886 ## to reduce load on host.
887 #
888 # SetNiceLevel = 0
889 # SetIOLimit = 0
890
891 ## The version string to embed in file signature databases
892 #
893 # VersionString = NULL
894
895 ## Interval between time stamp messages
896 #
897 # SetLoopTime = 60
898 SetLoopTime = 600
899
900 ## Interval between file checks 
901 #
902 # SetFileCheckTime = 600
903 SetFileCheckTime = 7200
904
905 ## Alternative: crontab-like schedule
906 #
907 # FileCheckScheduleOne = NULL
908
909 ## Alternative: crontab-like schedule(2)
910 #
911 # FileCheckScheduleTwo = NULL
912
913 ## Report only once on modified fles 
914 ## Setting this to 'FALSE' will generate a report for any policy 
915 ## violation (old and new ones) each time the daemon checks the file system.
916 #
917 # ReportOnlyOnce = True
918
919 ## Report in full detail
920 #
921 # ReportFullDetail = False
922
923 ## Report file timestamps in local time rather than GMT
924 #
925 # UseLocalTime = No
926
927 ## The console device (can also be a file or named pipe)
928 ## - There are two console devices. Accordingly, you can use
929 ##   this directive a second time to set the second console device.
930 ##   If you have not defined the second device at compile time,
931 ##   and you don't want to use it, then:
932 ##   setting it to /dev/null is less effective than just leaving
933 ##   it alone (setting to /dev/null will waste time by opening
934 ##   /dev/null and writing to it)
935 #
936 # SetConsole = /dev/console
937
938 ## Activate the SysV IPC message queue
939 #
940 # MessageQueueActive = False
941
942
943 ## If false, skip reverse lookup when connecting to a host known 
944 ## by name rather than IP address (i.e. trust the DNS)
945 #
946 # SetReverseLookup = True
947
948 ## --- E-Mail ---
949
950 # Only highest-level (alert) reports will be mailed immediately,
951 # others will be queued. Here you can define, when the queue will
952 # be flushed (Note: the queue is automatically flushed after
953 # completing a file check).
954 #
955 SetMailTime = 86400
956
957 ## Maximum number of mails to queue
958 #
959 SetMailNum = 10
960
961 ## Recipient (max. 8)
962 #
963 SetMailAddress=samhain-reports@<%= @fqdn -%>
964
965 SetMailRelay = localhost
966
967 ## Custom subject format
968 #
969 MailSubject = [Samhain at %H] %T: %S
970
971 ## --- end E-Mail ---
972
973 ## Path to the prelink executable
974 #
975 # SetPrelinkPath = /usr/sbin/prelink
976
977 ## TIGER192 checksum of the prelink executable
978 #
979 # SetPrelinkChecksum = (no default)
980
981
982 ## Path to the executable. If set, will be checksummed after startup
983 ## and before exit.
984 #
985 # SamhainPath = (no default)
986
987
988 ## The IP address of the log server
989 #
990 # SetLogServer = (default: compiled-in)
991
992 ## The IP address of the time server
993 #
994 # SetTimeServer = (default: compiled-in)
995
996 ## Trusted Users (comma delimited list of user names) 
997 #
998 # TrustedUser = (no default; this adds to the compiled-in list)
999
1000 ## Path to the file signature database
1001 #
1002 # SetDatabasePath = (default: compiled-in)
1003
1004 ## Path to the log file
1005 #
1006 # SetLogfilePath = (default: compiled-in)
1007
1008 ## Path to the PID file
1009 #
1010 # SetLockPath = (default: compiled-in)
1011
1012
1013 ## The digest/checksum/hash algorithm
1014 #
1015 # DigestAlgo = TIGER192
1016
1017
1018 ## Custom format for message header. 
1019 ## CAREFUL if you use XML logfile format.
1020 ##
1021 ## %S severity
1022 ## %T timestamp
1023 ## %C class
1024 ##
1025 ## %F source file
1026 ## %L source line
1027 #
1028 # MessageHeader="%S %T "
1029
1030
1031 ## Don't log path to config/database file on startup
1032 #
1033 # HideSetup = False
1034
1035 ## The syslog facility, if you log to syslog
1036 #
1037 # SyslogFacility = LOG_AUTHPRIV
1038 SyslogFacility=LOG_LOCAL2
1039
1040 ## The message authentication method
1041 ## - If you change this, you *must* change it
1042 ##   on client *and* server
1043 #
1044 # MACType = HMAC-TIGER
1045
1046
1047 ## everything below is ignored
1048 [EOF]
1049
1050 #####################################################################
1051 # This would be the proper syntax for parts that should only be
1052 #    included for certain hosts.
1053 # You may enclose anything in a @HOSTNAME/@end bracket, as long as the
1054 #    result still has the proper syntax for the config file.
1055 # You may have any number of @HOSTNAME/@end brackets.
1056 # HOSTNAME should be the fully qualified 'official' name 
1057 #    (e.g. 'nixon.watergate.com', not 'nixon'), no aliases. 
1058 #    No IP number - except if samhain cannot determine the 
1059 #    fully qualified hostname.
1060 #
1061 # @HOSTNAME
1062 # file=/foo/bar
1063 # @end
1064 #
1065 # These are two examples for conditional inclusion/exclusion
1066 # of a machine based on the output from 'uname -srm'
1067 # $Linux:2.*.7:i666
1068 # file=/foo/bar3
1069 # $end
1070 #
1071 # !$Linux:2.*.7:i686
1072 # file=/foo/bar2
1073 # $end
1074 #
1075 #####################################################################