When /etc/init.d/nagios starts the nagios daemon as user 'nagios', HOME is kept as /root instead of setting it to, for example, /var/nagios. See: $ pgrep -n -u nagios -x nagios | xargs -n 1 -i cat /proc/{}/environ | xargs -0 -n 1 echo | grep '^HOME=' That makes it impossible to use a .my.cnf in ~nagios/ for check_mysql or other check plugins that could use or even need special config files in ~nagios/ (check_by_ssh is another example). Solution: 1. Do not set the home directory of 'nagios' to /dev/null, use /var/nagios, /home/nagios or something else that can be used to put files into. 2. Add "-e HOME=/path/to/nagios/home" to the start-stop-daemon call in /etc/init.d/nagios I have tried it and it works fine.
Fixed in nagios-core-2.9 and nagios-plugins-1.4.6.