Page 2 of 2

Re: Nagios XI 5.5.2 with modgearman ...

Posted: Thu Aug 23, 2018 9:40 am
by lmiltchev
Aug 22 08:07:15 ausulnxipwb01 crontab[15394]: (nagios) AUTH (crontab command not allowed)
It seems like nagios user is not allowed to run cron jobs... Do you have cron.allow or cron.deny on this system?

Code: Select all

cat /etc/cron.allow
cat /etc/cron.deny
What the the permissions on /usr/bin/crontab?

Code: Select all

ls -l /usr/bin/crontab
Can you also run the following command and show the output?

Code: Select all

grep nosuid /etc/fstab

Re: Nagios XI 5.5.2 with modgearman ...

Posted: Thu Aug 23, 2018 10:16 am
by vishfx
I added nagios to cron.allow
Still dont see the cron running.

Below are the output details :

Code: Select all

cat /etc/cron.allow
root
nagios

cat /etc/cron.deny
######################################################################################
#   This file is managed by Puppet Enterprise
######################################################################################
ALL

ls -l /usr/bin/crontab
-rwsr-xr-x 1 root root 57576 Jan 26  2018 /usr/bin/crontab

grep nosuid /etc/fstab
/dev/mapper/osvg-tmp.fs /tmp                    xfs    defaults,nodev,nosuid 0 0


tail -50 /var/log/cron
Aug 23 10:10:47 ausulnxipwb01 crond[22738]: (CRON) INFO (Shutting down)
Aug 23 10:10:47 ausulnxipwb01 crond[83440]: (CRON) INFO (RANDOM_DELAY will be scaled with factor 70% if used.)
Aug 23 10:10:47 ausulnxipwb01 crond[83440]: (CRON) INFO (running with inotify support)
Aug 23 10:10:47 ausulnxipwb01 crond[83440]: (CRON) INFO (@reboot jobs will be run at computer's startup.)


Re: Nagios XI 5.5.2 with modgearman ...

Posted: Thu Aug 23, 2018 11:38 am
by lmiltchev
Have you tried restarting crond after adding nagios to the /etc/cron.allow?

Code: Select all

service crond restart
Try this or better yet, restart the server (if this is possible at the moment) to see if this is going to fix the issue. If the issue is still present, check the logs for clues one more time:

Code: Select all

tail -50 /var/log/cron
tail -50 /var/log/secure

There must be a mod that you made while hardening this server, that prevents nagios to run cron jobs. Do you remember what changes have you made? Also, make sure that fixes that you are trying are not reverted automatically by Puppet.

Re: Nagios XI 5.5.2 with modgearman ...

Posted: Mon Aug 27, 2018 1:30 am
by vishfx
Seems like cron failed because nagios user did not have a home dir.
I created one manually, all crons seem to work fine now.

Thanks a lot for your assistance.

Regards,
Vish.

Re: Nagios XI 5.5.2 with modgearman ...

Posted: Mon Aug 27, 2018 9:00 am
by lmiltchev
I am glad your issue has been resolved!

I am locking this topic.