/usr/share/doc/samhain/manual.html/basic-configuration.html is in samhain 3.1.0-5ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>Configuration of logging facilities</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="The Samhain Host Integrity Monitoring System"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="Support / Bugs / Problems"
HREF="support.html"><LINK
REL="NEXT"
TITLE="Available logging facilities"
HREF="configfacility.html"><LINK
REL="STYLESHEET"
TYPE="text/css"
HREF="./docbook.css"></HEAD
><BODY
CLASS="CHAPTER"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><!--#if expr="! ($HTTP_USER_AGENT = /MSIE/)"--><!--#include virtual="/resources/ssi/header.html"--><!--#endif --><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>The Samhain Host Integrity Monitoring System</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="support.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="configfacility.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="CHAPTER"
><H1
><A
NAME="BASIC-CONFIGURATION"
></A
>Chapter 4. Configuration of logging facilities</H1
><P
> The configuration file for
<SPAN
CLASS="APPLICATION"
>samhain</SPAN
> is named <TT
CLASS="FILENAME"
>samhainrc</TT
>
by default. Also by default, it is placed in
<TT
CLASS="FILENAME"
>/etc</TT
>.
(Name and location is configurable at compile time).
The distribution package comes with a commented sample
configuration file. The layout of the configuration file is described
in more details in <A
HREF="the-configuration-file.html#CONFIGFILE"
>Section C.1</A
>.</P
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="LOGDEF"
>4.1. General</A
></H1
><P
> <SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>Events</I
></SPAN
> (e.g. unauthorized modifications
of files monitored by <SPAN
CLASS="APPLICATION"
>samhain</SPAN
>)
will generate <SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>messages</I
></SPAN
> of some
<SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>severity</I
></SPAN
>. These messages will be
logged to all logging facilities, whose <SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>threshold</I
></SPAN
>
is equal to, or
lower than, the severity of the message.</P
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="SEVERITYDEF"
>4.1.1. Severity levels</A
></H2
><P
> The following severity levels are defined:
<DIV
CLASS="INFORMALTABLE"
><P
></P
><A
NAME="AEN999"
></A
><TABLE
BORDER="1"
FRAME="border"
CLASS="CALSTABLE"
><COL><COL><THEAD
><TR
><TH
>Level</TH
><TH
>Significance</TH
></TR
></THEAD
><TBODY
><TR
><TD
>none</TD
><TD
>Keyword to switch off a looging facility (*).</TD
></TR
><TR
><TD
>debug</TD
><TD
>Debugging-level messages.</TD
></TR
><TR
><TD
>info</TD
><TD
>Informational message.</TD
></TR
><TR
><TD
>notice</TD
><TD
>Normal conditions.</TD
></TR
><TR
><TD
>warn</TD
><TD
>Warning conditions.</TD
></TR
><TR
><TD
>mark</TD
><TD
>Timestamps.</TD
></TR
><TR
><TD
>err</TD
><TD
>Error conditions.</TD
></TR
><TR
><TD
>crit</TD
><TD
>Critical conditions.</TD
></TR
><TR
><TD
>alert</TD
><TD
>Program startup/normal exit, or fatal error, causing abnormal program termination.</TD
></TR
><TR
><TD
>inet</TD
><TD
>Incoming messages from clients (server only).</TD
></TR
></TBODY
></TABLE
><P
></P
></DIV
></P
><P
> (*) the keyword 'none' can only be used as a threshold for logging facilities,
to indicate that no messages shall be logged via that facility.</P
><P
> Most events (e.g. timestamps, internal errors, program startup/exit)
have <SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>fixed</I
></SPAN
> severities.
The following events have <SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>configurable</I
></SPAN
> severities:
(*) the keyword 'none' can only be used as a threshold for logging facilities,
to indicate that no messages shall be logged via that facility.</P
><P
><P
></P
><UL
><LI
><P
>(server only) failure to resolve a client address (section
<SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>[Misc]</I
></SPAN
>, option <SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>SeverityLookup</I
></SPAN
>)</P
></LI
><LI
><P
>policy violations (for monitored files)</P
></LI
><LI
><P
>access errors for files</P
></LI
><LI
><P
>access errors for directories</P
></LI
><LI
><P
>obscure file names (with non-printable characters)
and/or invalid UIDs/GIDs (no such user/group)</P
></LI
><LI
><P
>login/logout events (if <SPAN
CLASS="APPLICATION"
>samhain</SPAN
> is
configured to monitor them)</P
></LI
></UL
></P
><P
>Severity levels for events (see <A
HREF="basic-configuration.html#SEVERITYDEF"
>Section 4.1.1</A
>>)
are set in the <SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>EventSeverity</I
></SPAN
> and (for login/logout
events) the <SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>Utmp</I
></SPAN
> sections of the configuration file.</P
><P
> In the configuration file, these can be set as follows:</P
><PRE
CLASS="PROGRAMLISTING"
> [EventSeverity]
#
# these are policies
#
SeverityReadOnly=crit
SeverityLogFiles=crit
SeverityGrowingLogs=warn
SeverityIgnoreNone=crit
SeverityIgnoreAll=info
#
# these are access errors
#
SeverityFiles=err
SeverityDirs=err
#
# these are obscure file names
# and/or invalid UIDs/GIDs (no such user/group)
#
SeverityNames=info
#
# This is the section for login/logout monitoring
#
[Utmp]
SeverityLogin=notice
SeverityLogout=notice
# multiple logins by same user
SeverityLoginMulti=err </PRE
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="CLASSES"
>4.1.2. Classes</A
></H2
><P
> <SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>Events</I
></SPAN
> of related type are grouped into
<SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>classes</I
></SPAN
>. For each
logging facility, it is possible to restrict logging to a subset of
these classes (see <A
HREF="thresholds.html"
>Section 4.3</A
>>).
The available classes are:</P
><P
> <DIV
CLASS="INFORMALTABLE"
><P
></P
><A
NAME="AEN1070"
></A
><TABLE
BORDER="1"
FRAME="border"
CLASS="CALSTABLE"
><COL><COL><THEAD
><TR
><TH
>Class</TH
><TH
>Significance</TH
></TR
></THEAD
><TBODY
><TR
><TD
>EVENT</TD
><TD
>Events to be reported (i.e. policy violations, login/logout).</TD
></TR
><TR
><TD
>START</TD
><TD
>Startup/stop messages.</TD
></TR
><TR
><TD
>STAMP</TD
><TD
>Timestamp (heartbeat) messages.</TD
></TR
><TR
><TD
>LOGKEY</TD
><TD
>The key to verify the signed log file.</TD
></TR
><TR
><TD
>ERROR</TD
><TD
>Error messages.</TD
></TR
><TR
><TD
>OTHER</TD
><TD
>Everything else (e.g. informational messages).</TD
></TR
><TR
><TD
>AUD</TD
><TD
>System calls (for debugging).</TD
></TR
></TBODY
></TABLE
><P
></P
></DIV
></P
><P
>The aforementioned classes represent a new, simplified classification
scheme since version 1.8.2.
The previous scheme (listed below) will still work, and both
can be mixed.</P
><P
> <DIV
CLASS="INFORMALTABLE"
><P
></P
><A
NAME="AEN1100"
></A
><TABLE
BORDER="1"
FRAME="border"
CLASS="CALSTABLE"
><COL><COL><THEAD
><TR
><TH
>Class</TH
><TH
>Significance</TH
></TR
></THEAD
><TBODY
><TR
><TD
>AUD</TD
><TD
>System calls.</TD
></TR
><TR
><TD
>RUN</TD
><TD
>Normal run messages (e.g. startup, exit, ...)</TD
></TR
><TR
><TD
>STAMP</TD
><TD
>Timestamps and alike.</TD
></TR
><TR
><TD
>FIL</TD
><TD
>Messages related to file integrity checking.</TD
></TR
><TR
><TD
>TCP</TD
><TD
>Messages from the client/server subsystem.</TD
></TR
><TR
><TD
>PANIC</TD
><TD
>Fatal errors, leading to program termination.</TD
></TR
><TR
><TD
>ERR</TD
><TD
>Error messages (general).</TD
></TR
><TR
><TD
>ENET</TD
><TD
>Error messages (network).</TD
></TR
><TR
><TD
>EINPUT</TD
><TD
>Error messages (input, e.g. configuration file).</TD
></TR
></TBODY
></TABLE
><P
></P
></DIV
></P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="EHEAD-CUSOM"
>4.1.3. Error message customization</A
></H2
><P
>It is possible to customize the initial part (the <SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>header</I
></SPAN
>
of messages via the
<B
CLASS="COMMAND"
>MessageHeader=<TT
CLASS="REPLACEABLE"
><I
>"format"</I
></TT
></B
>
directive. <SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>Enclosing quotes are only required to protect
leading/trailing space, and there is no need to escape quotes within
the format string.</I
></SPAN
> The following placeholders are recognized:
<P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>%S</DT
><DD
><P
>Severity of the message.</P
></DD
><DT
>%T</DT
><DD
><P
>Timestamp of the message.</P
></DD
><DT
>%C</DT
><DD
><P
>Class of the message.</P
></DD
><DT
>%F</DT
><DD
><P
>Source file where the message originates from.</P
></DD
><DT
>%L</DT
><DD
><P
>Line number (in the source file) where the message originates from.</P
></DD
><DT
>%E</DT
><DD
><P
>An error code that may provide additional information in case of internal errors.</P
></DD
></DL
></DIV
></P
><P
> In the configuration file, these can be set as follows:</P
><PRE
CLASS="PROGRAMLISTING"
>[Misc]
#
# This is the default without XML
#
MessageHeader="%S %T "
#
# Default for XML-style messages.
# Note that quotes within the format strings are NOT escaped in any way.
#
# MessageHeader="<log sev="%S" tstamp="%T" "</PRE
></DIV
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="support.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="configfacility.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Support / Bugs / Problems</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
> </TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Available logging facilities</TD
></TR
></TABLE
></DIV
><!--#if expr="! ($HTTP_USER_AGENT = /MSIE/)"--><!--#include virtual="/resources/ssi/footer.html"--><!--#endif --></BODY
></HTML
>
|