$linuxjunkies
>

tripwire(8)

Tripwire is a file integrity monitoring tool that detects unauthorized changes to system files and directories.

UbuntuDebianFedoraArch

Synopsis

tripwire --init [options] | tripwire --check [options] | tripwire --update [options]

Description

Tripwire monitors file systems for unauthorized modifications by creating a database of file attributes (checksums, permissions, timestamps, sizes) and comparing them against the current state. It's commonly used to detect intrusions, malware, or accidental changes to critical system files.

The tool requires initial setup: you define which files to monitor in a policy file, initialize a database, then run periodic checks. When changes are detected, Tripwire generates detailed reports identifying what was modified, added, or deleted.

Tripwire uses encrypted policy and database files to prevent tampering by attackers. It's particularly valuable on servers where file integrity must be maintained and audited.

Common options

FlagWhat it does
--initInitialize the Tripwire database from the policy file (creates baseline)
--checkCompare current system state against the database and generate a report
--updateUpdate the database with changes verified as legitimate
--interactiveRun in interactive mode for --update, allowing you to approve/reject changes
-m PSpecify policy file to use (default: /etc/tripwire/tw.pol)
-d DATABASESpecify database file location (default: /var/lib/tripwire/)
-r REPORTSpecify report file to generate or read
--email-reportEmail the check report to configured recipients
--versionDisplay Tripwire version information
-helpDisplay help message with available options

Examples

Initialize the Tripwire database from the default policy file, creating the baseline

tripwire --init

Run an integrity check against the database and generate a report

tripwire --check

Perform a check and email the results to the configured recipients

tripwire --check --email-report

Update the database with changes documented in a specific report file

tripwire --update -r /var/lib/tripwire/report.twr

Interactively review and approve/reject changes before updating the database

tripwire --update --interactive

Run a check using a custom policy file instead of the default

tripwire --check -m /etc/tripwire/custom.pol

Print and view a Tripwire report in plain text format

twprint -m r -r /var/lib/tripwire/report.twr | less

Initialize the database with verbose output showing all files being scanned

tripwire --init --verbose

Related commands