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

NSM: create /usr/sbin/broctl #1043

@dougburks

Description

@dougburks

/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 $@"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions