9 Running agent as root
It is no longer possible to configure which user Zabbix agent runs as via zabbix_agentd.conf
file, because the agent will bypass this configuration and run as the user specified in the systemd service file. To run Zabbix agent as root you need to make the modifications described below.
To override the default user and group for Zabbix agent, run:
User=root
Group=root
Reload daemons and restart the zabbix-agent service:
For Zabbix agent this re-enables the functionality of configuring user in the zabbix_agentd.conf
file. Now you need to set and AllowRoot=1
configuration parameters in the agent .
Zabbix agent 2
Then, add the following content:
Reload daemons and restart the zabbix-agent service:
systemctl daemon-reload