Run axolet as non-root
If the log collector agent (AxoSyslog or syslog-ng) is running as a non-root user, you may want to configure the Axolet agent to run as the same user.
To do that, set the AXOLET_USER and AXOLET_GROUP environment variables to the user’s username and groupname. For details, see Advanced installation options.
Operators will need to have access to the following commands:
-
/usr/bin/systemctl * axolet.service: Controls theaxolet.servicesystemd unit. Usually*isstart,stop,restart,enable, andstatus. Used by the operators for troubleshooting. -
/usr/local/bin/configure-axolet: Creates initialaxoletconfiguration and enables/starts theaxoletservice. Executed by the bootstrap script. -
Command to install and upgrade the
axoletpackage. Executed by the bootstrap script if the packages aren’t already installed.- On RPM-based Linux distributions:
/usr/bin/rpm -Uv axo*.rpm - On DEB-based Linux distributions:
/usr/bin/dpkg -i axo*.deb
- On RPM-based Linux distributions:
For example, you can permit the syslogng user to run these commands by running the following commands:
sudo tee /etc/sudoers.d/configure-axoflow <<A
syslogng ALL=(ALL) NOPASSWD: /usr/local/bin/configure-axolet
syslogng ALL=(ALL) NOPASSWD: /bin/systemctl * axolet.service
# for rpm installation:
syslogng ALL=(ALL) NOPASSWD: /usr/bin/rpm -Uv axo*.rpm
A
sudo tee /etc/sudoers.d/configure-axoflow <<A
syslogng ALL=(ALL) NOPASSWD: /usr/local/bin/configure-axolet
syslogng ALL=(ALL) NOPASSWD: /bin/systemctl * axolet.service
# for deb installation:
syslogng ALL=(ALL) NOPASSWD: /usr/bin/dpkg -i axo*.deb
A