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