Sample Header Ad - 728x90

sudo asks for password on some servers

1 vote
1 answer
1125 views
I have some sudo rules setup for many (virtual) servers (mostly debian) to be used by zabbix scripts: zabbix ALL=NOPASSWD: /etc/init.d/exim4 restart The zabbix-agent and sudo configuration file (/etc/sudoers.d/zabbix-agent) is distributed via ansible, and is the same for all servers. However, on some servers, sudo asks for a password. On others, it does not. It is the same whether I run the command using zabbix, or locally: # sudo -u zabbix sudo /etc/init.d/exim4 restart Sometimes, it works and sometimes it asks for the password. I looked into it, and the obvious answer that there is a different rule for the zabbix user in the sudo config is not true. What other factors could result in the system asking for a password anyway?
Asked by P.Péter (525 rep)
Apr 15, 2020, 03:46 PM