From f074179656d6f39eed0f767f687a6de010af2646 Mon Sep 17 00:00:00 2001 From: Jason Ertel Date: Fri, 20 Nov 2020 14:13:44 -0500 Subject: [PATCH] Correct so-import-pcap wrapping; add so-pcap-import alias for so-import-pcap; prompt to reboot after changing IP address on manager; ensure all tools have exec bit set --- salt/common/tools/sbin/so-import-pcap | 3 +-- salt/common/tools/sbin/so-ip-update | 6 +++--- salt/common/tools/sbin/so-playbook-reset | 0 salt/common/tools/sbin/so-ssh-harden | 0 salt/common/tools/sbin/so-wazuh-user-add | 0 salt/common/tools/sbin/so-wazuh-user-passwd | 0 salt/common/tools/sbin/so-wazuh-user-remove | 0 7 files changed, 4 insertions(+), 5 deletions(-) mode change 100644 => 100755 salt/common/tools/sbin/so-ip-update mode change 100644 => 100755 salt/common/tools/sbin/so-playbook-reset mode change 100644 => 100755 salt/common/tools/sbin/so-ssh-harden mode change 100644 => 100755 salt/common/tools/sbin/so-wazuh-user-add mode change 100644 => 100755 salt/common/tools/sbin/so-wazuh-user-passwd mode change 100644 => 100755 salt/common/tools/sbin/so-wazuh-user-remove diff --git a/salt/common/tools/sbin/so-import-pcap b/salt/common/tools/sbin/so-import-pcap index f10f5fad9..2dc5b0504 100755 --- a/salt/common/tools/sbin/so-import-pcap +++ b/salt/common/tools/sbin/so-import-pcap @@ -27,8 +27,7 @@ function usage { cat << EOF Usage: $0 [pcap-file-2] [pcap-file-N] -Imports one or more PCAP files onto a sensor node. The PCAP traffic will be analyzed and -made available for review in the Security Onion toolset. +Imports one or more PCAP files onto a sensor node. The PCAP traffic will be analyzed and made available for review in the Security Onion toolset. EOF } diff --git a/salt/common/tools/sbin/so-ip-update b/salt/common/tools/sbin/so-ip-update old mode 100644 new mode 100755 index 7321a5587..8ab012ccf --- a/salt/common/tools/sbin/so-ip-update +++ b/salt/common/tools/sbin/so-ip-update @@ -50,9 +50,9 @@ if [ "$CONTINUE" == "y" ]; then echo "The IP has been changed from $OLD_IP to $NEW_IP." - if [ -z "$SKIP_STATE_APPLY" ]; then - echo "Re-applying salt states." - salt-call state.highstate queue=True + read -n 1 -p "The system must reboot to ensure all services have restarted with the new configuration. Reboot now? (y/N)" CONTINUE + if [ "$CONTINUE" == "y" ]; then + reboot fi else echo "Exiting without changes." diff --git a/salt/common/tools/sbin/so-playbook-reset b/salt/common/tools/sbin/so-playbook-reset old mode 100644 new mode 100755 diff --git a/salt/common/tools/sbin/so-ssh-harden b/salt/common/tools/sbin/so-ssh-harden old mode 100644 new mode 100755 diff --git a/salt/common/tools/sbin/so-wazuh-user-add b/salt/common/tools/sbin/so-wazuh-user-add old mode 100644 new mode 100755 diff --git a/salt/common/tools/sbin/so-wazuh-user-passwd b/salt/common/tools/sbin/so-wazuh-user-passwd old mode 100644 new mode 100755 diff --git a/salt/common/tools/sbin/so-wazuh-user-remove b/salt/common/tools/sbin/so-wazuh-user-remove old mode 100644 new mode 100755