Is there any way to force sudo to not log actions from a specific user?
All of the servers in my network are running a Zabbix agent for monitoring, and some of the additional items I've added to them require the use of sudo
to execute.
Normally this isn't that bad, but for one in particular, this results in about 75 lines every minute in the journal relating to it's usual data gathering.
Is there any way to specifically tell sudo
to not log anything for a particular user?
I tried adding
Defaults:zabbix logfile=/dev/null
to my sudoers
file, which stopped the session opened
and session closed
log lines, but isn't stopping this mess:
sudo[12424]: zabbix : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=...
sudo[12433]: zabbix : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=...
sudo[12435]: zabbix : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=...
sudo[12437]: zabbix : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=...
sudo[12449]: zabbix : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=...
sudo[12459]: zabbix : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=...
sudo[12465]: zabbix : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=...
sudo[12467]: zabbix : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=...
Solution 1:
Using visudo
, you can add this line to your syslog configuration to disable all logging for user zabbix
:
Defaults: zabbix !syslog