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