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