- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: cron and crontab logging
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2004 03:56 AM
08-24-2004 03:56 AM
cron and crontab logging
I have been tasked to implement a logging system for crontab changes. The company wants to record who, when and what was changed in each crontab or at file. The cron log records when the jobs run but we need to capture if and when the cron or the at job schedules are changed and who changed them.
Is there solution from HP or another software provider or do I need to generate something in-house.
Thanks…
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2004 04:02 AM
08-24-2004 04:02 AM
Re: cron and crontab logging
RCS (Revision Control System) is inbuilt and can be used for this purpose.
man co and man ci
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2004 04:07 AM
08-24-2004 04:07 AM
Re: cron and crontab logging
I would suggest you lock down crontab via /usr/lib/cron/cron.allow and /usr/lib/cron/cron.deny, so that only root can submit cron jobs. The the root user can maintain a record of what changed and who changed. This isn't an ideal solution, obviously, because it's manual, but I know of no way to accomplish this via software.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2004 04:10 AM
08-24-2004 04:10 AM
Re: cron and crontab logging
Man page (cron) -->
A history of all actions taken by cron is recorded in
/usr/lib/cron/log.
You can automate cron actions with some scripts with additional informations to be logged when invoking on command line as a service. That script will have to take charge all cron* actions on shell.
So control / actions has to be done through this script.
Regards
Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2004 04:13 AM
08-24-2004 04:13 AM
Re: cron and crontab logging
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2004 04:17 AM
08-24-2004 04:17 AM
Re: cron and crontab logging
You can have 1 crontab file for the root account and this file is the same on all 3 servers. You would need to put in some logic to check the hostname and if correct then run some job on that respective host.
Not an ideal solution but one that will be more manageable in keeping track of your crontab file. (You only have 1 to keep track of)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2004 06:35 PM
08-24-2004 06:35 PM
Re: cron and crontab logging
Just another suggestion:
write a script that uses RCS to check all cron files in /var/spool/cron/crontabs against their previously obtained contents in RCS files in a separate directory.
If there is a difference, check in the new version and send an alert (mail?) to the admins that something has changed and needs to be checked. Alternatively, if you do not check in the change, you will receive the alert till some admin checks in the change manually.
This script can be run using cron ;-).
I've used a script like these to check for all root setuid files on a system.
JP.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2004 12:27 AM
08-25-2004 12:27 AM
Re: cron and crontab logging
Thanks for the help...