Áú»¢¶Ä²©

You are viewing documentation for the development version, it may be incomplete.
Join our translation project and help translate Áú»¢¶Ä²© documentation into your native language.

9 Running agent as root

Since Áú»¢¶Ä²© 5.0.0, the systemd service file for Áú»¢¶Ä²© agent in official packages explicitly includes directives for User and Group. Both are set to zabbix.

It is no longer possible to configure which user Áú»¢¶Ä²© 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 Áú»¢¶Ä²© agent as root you need to make the modifications described below.

Áú»¢¶Ä²© agent

To override the default user and group for Áú»¢¶Ä²© agent, run:

systemctl edit zabbix-agent

Then, add the following content:

[Service]
       User=root
       Group=root

Reload daemons and restart the zabbix-agent service:

systemctl daemon-reload
       systemctl restart zabbix-agent

For Áú»¢¶Ä²© agent this re-enables the functionality of configuring user in the zabbix_agentd.conf file. Now you need to set User=root and AllowRoot=1 configuration parameters in the agent configuration file.

Áú»¢¶Ä²© agent 2

To override the default user and group for Áú»¢¶Ä²© agent 2, run:

systemctl edit zabbix-agent2

Then, add the following content:

[Service]
       User=root
       Group=root

Reload daemons and restart the zabbix-agent2 service:

systemctl daemon-reload
       systemctl restart zabbix-agent2

For Áú»¢¶Ä²© agent2 this completely determines the user that it runs as. No additional modifications are required.