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