You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 16, 2021. It is now read-only.
This checks for the existence of the files, alerts/exits if they are missing:
/usr/bin/nsm_all_del_quick
# Delete all sensors
if [ -f "/etc/nsm/sensortab" ];
then for INTERFACE in `cat "/etc/nsm/sensortab" | grep -v "^#" |cut -f1`
do
echo y | nsm_sensor_del --sensor-name="$INTERFACE"
done
else echo "Sensortab appears to be missing! No sensors changed.";
fi
# Delete all servers (should only be one)
if [ -f "/etc/nsm/servertab" ];
then for SERVER in `cat "/etc/nsm/servertab" | grep -v "^#" |cut -f1`
do
echo y | nsm_server_del --server-name="$SERVER"
done
else echo "Servertab appears to be missing! No servers changed.";
fi
Tested on:
Ubuntu 12.04.5 LTS
PPA packages
Tested against dummy files and NOT calling nsm_server/sensor_del.
Hope this helps.
Tim Whisnant - @heywiz
Thanks, Tim! I also added a check to ensure root privileges.
Submitted for testing:
https://groups.google.com/d/topic/security-onion-testing/5C7j_gBWxbc/discussion
Original issue reported on code.google.com by
[email protected]
on 17 Nov 2014 at 2:47The text was updated successfully, but these errors were encountered: