#9 Lopende agent als root
Vanaf versie 5.0.0 het systemd-servicebestand voor Zabbix agent in officieel pakketten is bijgewerkt om expliciet richtlijnen voor 'Gebruiker' en 'Groep' op te nemen. Beide zijn ingesteld op zabbix
.
Dit betekent dat de oude functionaliteit van het configureren van welke gebruiker Zabbix agent draait als via zabbix_agentd.conf
bestand wordt omzeild en agent zal altijd uitvoeren als de gebruiker die is opgegeven in het systemd-servicebestand.
Om dit nieuwe gedrag te negeren, maakt u een /etc/systemd/system/zabbix-agent.service.d/override.conf
bestand met de volgende inhoud:
Laad daemons opnieuw en start de zabbix-agent-service opnieuw:
Voor Zabbix agent2 bepaalt dit volledig de gebruiker die het uitvoert net zo.
Voor oude agent activeert dit alleen de functionaliteit van configureren gebruiker in het bestand zabbix_agentd.conf
. Daarom om zabbix uit te voeren agent als root moet je de agent nog bewerken configuratie file en specificeer User=root
als evenals AllowRoot=1
opties.
To override the default user and group for Zabbix agent, run:
Then, add the following content:
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 User=root
and AllowRoot=1
configuration parameters in the agent configuration file.
To override the default user and group for Zabbix agent 2, run:
Then, add the following content:
Reload daemons and restart the zabbix-agent service:
For Zabbix agent2 this completely determines the user that it runs as. No additional modifications are required.