Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Every hour I get an email from the server with the following cron error:

DBI connect('database=runtime;host=localhost','nagios',...) failed:  
 Access denied for user 'nagios'@'localhost' (using password: YES) at
  /usr/local/nagios/perl/lib/Ima/DBI.pm line 329

We do not actually use nagios on that server, so it is okay if it is not working. I would like to stop this cron job but I cannot find the cron file where it is rooted.

/etc/cron.hourly does not have it.
crontab -l does not show it.

The only place I could find this command was this file:

/usr/local/nagios/installer/crontab.nagios

I'm not sure if I should manipulate this file however.

share|improve this question
    
Did you take a look at /var/spool/cron? –  quanta Oct 16 '11 at 14:29
    
@quanta , I checked it now and there is a file named nagios. I can see the relevant line within that file. I've commented it out. Let's see what happens. Would you like to write an answer to this question, so I can mark it in case it resolves the problem? –  Haluk Oct 16 '11 at 15:34

2 Answers 2

up vote 1 down vote accepted

I suspect that you have a cron job running as nagios user. So, take at look at /var/spool/cron or use crontab -l -u nagios command to check. If it exists and you don't want to use, just comment out or execute crontab -r -u nagios to remove.

share|improve this answer

Have you checked /etc/cron.d?

If you do not run Nagios on that host, editing the script is safe - as it would only affect Nagios.

share|improve this answer
    
Yes I've checked /etc/cron.d –  Haluk Oct 16 '11 at 15:32
    
You should check all the files in /etc/cron.d/, you should check /etc/cron.hourly for symlinks, you should check /etc/crontab, and /var/spool/cron ... crontab -l lists /var/spool/cron/-contents for the current user ... it may be the nagios-user. –  Kvisle Oct 16 '11 at 15:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.