summaryrefslogtreecommitdiff
path: root/system/ossec-local
diff options
context:
space:
mode:
authorDavid Spencer <baildon.research@googlemail.com>2016-11-09 17:06:18 +0000
committerDavid Spencer <idlemoor@slackbuilds.org>2016-11-11 20:36:22 +0000
commitc5bed608309fa29d81b1820369ed0206567b5c75 (patch)
treeb8131a2c179ef26d13479dfab240edd52b5582bc /system/ossec-local
parenta175ac8983b7f5e33773ca43091b27322776aed8 (diff)
downloadslackbuilds-c5bed608309fa29d81b1820369ed0206567b5c75.tar.gz
system/ossec-local: Fix exit status, add uid/gid info.
Signed-off-by: David Spencer <baildon.research@googlemail.com> Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'system/ossec-local')
-rw-r--r--system/ossec-local/README2
-rw-r--r--system/ossec-local/README.SLACKWARE8
-rw-r--r--system/ossec-local/ossec-local.SlackBuild6
3 files changed, 13 insertions, 3 deletions
diff --git a/system/ossec-local/README b/system/ossec-local/README
index 955a80fcad..f973332031 100644
--- a/system/ossec-local/README
+++ b/system/ossec-local/README
@@ -1,3 +1,5 @@
OSSEC is an Open Source Host-based Intrusion Detection System that performs log
analysis, file integrity checking, policy monitoring, rootkit detection,
real-time alerting and active response.
+
+See README.SLACKWARE for installation instructions.
diff --git a/system/ossec-local/README.SLACKWARE b/system/ossec-local/README.SLACKWARE
index e07808bfc6..14aba4be39 100644
--- a/system/ossec-local/README.SLACKWARE
+++ b/system/ossec-local/README.SLACKWARE
@@ -1,3 +1,11 @@
+These users and group need to be added:
+
+ groupadd -g 333 ossec
+ useradd -u 333 -g 333 -d /var/ossec -s /bin/false ossec
+ useradd -u 334 -g 333 -d /var/ossec -s /bin/false ossecm
+ useradd -u 335 -g 333 -d /var/ossec -s /bin/false ossecr
+
+
You may wish to add these lines to /etc/rc.d/rc.local to start the service:
if [ -x /etc/rc.d/rc.ossec ]; then
diff --git a/system/ossec-local/ossec-local.SlackBuild b/system/ossec-local/ossec-local.SlackBuild
index b7047d6e92..f082ab96cd 100644
--- a/system/ossec-local/ossec-local.SlackBuild
+++ b/system/ossec-local/ossec-local.SlackBuild
@@ -62,7 +62,7 @@ USERID_REMOTE=${USERID_REMOTE:-335}
GROUPID=${GROUPID:-333}
if ! grep ^ossec: /etc/group 2>&1 > /dev/null \
-|| ! grep -E '^(ossec|ossecm|ossecr):' /etc/passwd 2>&1 > /dev/null; then
+ || ! grep -E '^(ossec|ossecm|ossecr):' /etc/passwd 2>&1 > /dev/null; then
echo -e "\n You must have ossec users and a group to run this script\n"
fi
@@ -86,9 +86,9 @@ if ! grep ^ossecr: /etc/passwd 2>&1 > /dev/null; then
fi
if ! grep ^ossec: /etc/group 2>&1 > /dev/null \
-|| ! grep -E '^(ossec|ossecm|ossecr):' /etc/passwd 2>&1 > /dev/null; then
+ || ! grep -E '^(ossec|ossecm|ossecr):' /etc/passwd 2>&1 > /dev/null; then
echo
- exit
+ exit 1
fi
set -e