New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NSM: create /usr/sbin/broctl #1043

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

Comments

Projects
None yet
1 participant
@dougburks
Contributor

dougburks commented Dec 21, 2016

/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

This comment has been minimized.

Show comment
Hide comment
Contributor

dougburks commented Dec 21, 2016

@dougburks

This comment has been minimized.

Show comment
Hide comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment