Zabbix Documentation 4.4

3.04.04.4 (current)| In development:5.0 (devel)| Unsupported:1.82.02.22.43.23.44.2Guidelines

User Tools

Site Tools


Sidebar

manual:appendix:install:run_agent_as_root

7 Running agent as root

Starting with version 4.4.2 systemd service file for Zabbix agent in official packages (https://www.zabbix.com/download) was updated to explicitly include directives for User and Group. Both are set to zabbix.

This means that old functionality of configuring which user Zabbix agent runs as via zabbix_agentd.conf file is bypassed and agent will always run as the user specified in the systemd service file.

To override this new behavior create file /etc/systemd/system/zabbix-agent.service.d/override.conf with the following content.

[Service]
User=root
Group=root

Reload daemons and restart zabbix-agent service.

systemctl daemon-reload
systemctl restart zabbix-agent

For agent2 this completely determines the user that it runs as.

For old agent this only re-enables the functionality of configuring user in zabbix_agentd.conf file. Therefore in order to run zabbix agent as root you still have to edit zabbix_agentd.conf and specify User=root as well as AllowRoot=1 options. More on this here: https://www.zabbix.com/documentation/4.0/manual/appendix/config/zabbix_agentd.