Red Hat Bugzilla – Bug 487416
sosplugin to collect the details on cron including the system and user cron jobs
Last modified: 2012-11-02 14:31:10 EDT
Created attachment 333234 [details]
A sos plugin to gather the details on the system cron jobs and user specific cron jobs. This could help if there are cron jobs resetting any sort of system configurations, and one would not suspect a cron job in the scenario.
Steps to Reproduce:
a) Create a new file named 'crontab.py' in the sos plugins directory '/usr/lib/python2.4/site-packages/sos/plugins/'.
b) Add the following content in the file 'crontab.py' :
""" System and User's crontab details
self.collectExtOutput("/usr/bin/crontab -l -u root", suggest_filename = "root_crontab")
self.collectExtOutput("""for i in `ls /home/`;\
do echo "User :" $i;/usr/bin/crontab -l -u $i;\
echo "---------------";done""", suggest_filename = "users_crontab")
c) The above steps will create the sos plugin named 'crontab'. This plugin can be run individually using the command 'sosreport --only-plugins=crontab'.
d) The collected details are :
(i) The file under /etc/ starting with 'cron'.
(ii) Collect the root user's crontab in the file 'sos_commands/crontab/root_crontab'.
(iv) Collect the individual cron settings of every user under /home and save it under 'sos_commands/crontab/users_crontab'.
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.