debian-cis/bin/postinstall/tripwire.sh
2016-05-02 11:11:07 +02:00

20 lines
851 B
Bash
Executable File
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
#
# CIS Debian 7 Hardening
#
# If you followed this CIS hardening, this script follows 8.3.1_install_tripwire.sh
# After installing tripwire, you may want to run those few commented commands to make it fully functionnal
echo "Generating Site key file..."
twadmin -m G -S /etc/tripwire/site.key # Generates Site key file
echo "Generating Local key file..."
twadmin -m G -S /etc/tripwire/$(hostname -f)-local.key # Generate local key file
echo "Generating encrypted policy..."
twadmin -m P /etc/tripwire/twpol.txt # Apply new policy with generated site key file
echo "Generating Local database with newly created key..."
/usr/sbin/twadmin --create-cfgfile -S /etc/tripwire/site.key /etc/tripwire/twcfg.txt # Init database with generated local key file
echo "Testing tripwire database update"
tripwire -m i # Test configuration update