Skip to content
This repository has been archived by the owner on Apr 16, 2021. It is now read-only.

NSM: create /usr/sbin/broctl #1043

Closed
dougburks opened this issue Dec 21, 2016 · 3 comments
Closed

NSM: create /usr/sbin/broctl #1043

dougburks opened this issue Dec 21, 2016 · 3 comments

Comments

@dougburks
Copy link
Contributor

/usr/sbin/broctl will be a wrapper to run /opt/bro/bin/broctl as a limited user:

#!/bin/bash

SO_CONF="/etc/nsm/securityonion.conf"

# Add new Bro entries to SO_CONF if necessary
if ! grep BRO_USER $SO_CONF >/dev/null; then
        echo >> $SO_CONF
        echo "# BRO_USER specifies the user account used to start Bro." >> $SO_CONF
        echo "BRO_USER=sguil"   >> $SO_CONF
        echo "BRO_GROUP=sguil"  >> $SO_CONF
fi

# load in user config
. $SO_CONF

su $BRO_USER -c "/opt/bro/bin/broctl $@"
@dougburks
Copy link
Contributor Author

dougburks commented Dec 21, 2016

@dougburks
Copy link
Contributor Author

@dougburks
Copy link
Contributor Author

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant