- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: cron getting zero/blank
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
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
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-21-2008 07:13 AM
08-21-2008 07:13 AM
HP-UX B.11.00
we have been observing a particular user's cron job is getting zeroed out randomly.(under /var/spool/cron/crontabs).
i know of only crontab getting zero while editing if the /var FS get filled at the same time.Any one observed similar issue?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2008 07:42 AM
08-21-2008 07:42 AM
Re: cron getting zero/blank
I'd start by asking the "owner" what, if any, changes they were attempting to make.
I take it you mean the file is still there, but empty, as opposed to deleted.
accidents when doing "crontab -e" would cause this. I encourage doing:
crontab -l >
vi
crontab
instead of directly editting it, btw.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2008 09:36 AM
08-21-2008 09:36 AM
Re: cron getting zero/blank
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2008 10:17 AM
08-21-2008 10:17 AM
Re: cron getting zero/blank
drwxr-xr-x 26 bin bin 3072 Jul 25 2007 /var
dr-xr-xr-x 16 bin bin 1024 Aug 24 2005 /var/spool
dr-xr-xr-x 5 bin bin 1024 Aug 21 14:05 /var/spool/cron
dr-xr-xr-x 2 bin bin 96 Aug 21 14:07 /var/spool/cron/crontabs
and the actual crontabs:
-r-------- 1 root sys 73 Aug 21 14:07 l00s7m
-r-------- 1 root sys 314 Aug 14 14:13 root
It sounds like somebody tried to do "crontab -e" and /tmp was full. if they exited with a "ZZ" or "wq" it would have saved an empty file.
Tripwire may be of some use...it'll tell you the file changed, but not who or how (and aftrer the fact of course)
http://en.wikipedia.org/wiki/Tripwire_(software)
Event auditing might get it, but I believe that is system-wide, not file specific. You might examine the .sh_history file for the user in question, if available. If you've many crontab users, and only one is having issues, then it is almost certainly user error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2008 10:19 AM
08-21-2008 10:19 AM
Re: cron getting zero/blank
In additino to Court's advice for handling 'crontabs' [which I follow too], you might examine the '.sh_history' of the affected user for clues.
You might also look at 'root's '.sh_history' since a properly configured '/var/spool/cron/crontabs' directory holds files owned by *root* and will not allow truncation nor overwriting the files therein by users other than root.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2008 10:20 AM
08-21-2008 10:20 AM
Re: cron getting zero/blank
If the permissions are set properly, root should be the only one who can write/overwrite the user's crontab (except when the user does the "crontab -e" thing noted above)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2008 10:22 AM
08-21-2008 10:22 AM
Re: cron getting zero/blank
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2008 10:27 AM
08-21-2008 10:27 AM
Re: cron getting zero/blank
> OldSchool: hmmm...james beat me to it...but only by 45 seconds
Yeah, I saw that too. Seems like great minds run in the same circle [or, "rut" if you prefer] :-}}
{ too: I said "Court" but meant "OldSchool" }
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2008 11:00 AM
08-21-2008 11:00 AM
Re: cron getting zero/blank
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2008 11:29 AM
08-21-2008 11:29 AM
Re: cron getting zero/blank
sounds like it reports the difference . will it help to tell what casued the change?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2008 11:45 AM
08-21-2008 11:45 AM
Re: cron getting zero/blank
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2008 05:04 PM
08-21-2008 05:04 PM
SolutionThat is very bad. The top level directories and mountpoints must never be owned by any user except root. Is the root password secure? That is, do inexperienced or untrained people know the root password?
Another way to zero crontab is to run it without any parameters. An inexperienced user might type: crontab, then the user types ctrl-d to get a system prompt. Now crontab has been blown away by the user. Look at the user's shell history file. Any crontab commands with no option?
Bill Hassell, sysadmin