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