1833758 Members
2733 Online
110063 Solutions
New Discussion

crontab entry erased

 
sherinchandy
Advisor

crontab entry erased

Hi

Hi all,

I have an N-Class box running B11.11
After a reboot the crontab entry for oracle got errased I mean the file size was zero bytes(/var/spool/cron/crontabs)nothing was there in the file

can anybody explain what could be the reason

regds

S Chandy
11 REPLIES 11
Jov
Honored Contributor

Re: crontab entry erased

Hi,

Can you confirm there were cron jobs for Oracle before the reboot?


Jov
Steven E. Protter
Exalted Contributor

Re: crontab entry erased

Shalom,

This can happen if the box crashed/rebooted during editing or if /var got full.

Check the underlying hardware on the /var filesystem.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
sherinchandy
Advisor

Re: crontab entry erased

Hi

there might be cron jobs before reboot most probably

and server rebooted after patching

Jov
Honored Contributor

Re: crontab entry erased

Hi,

Can you verify this with the timestamp on the oracle user cron spool file?

If timestamp is older than reboot, then its unlikely due to the reboot.


Jov
sherinchandy
Advisor

Re: crontab entry erased

Time stamp was of reboot

Jov
Honored Contributor

Re: crontab entry erased

Can you let us know what patch was applied? There might be a patch that touched updated cron and related files, but might be buggy.

Was other crontabs affected?


Jov
sherinchandy
Advisor

Re: crontab entry erased

Patches applied are ISRM OS security patches
only one users (oracle's)crontab got erased
A. Clay Stephenson
Acclaimed Contributor

Re: crontab entry erased

I would bet money that what actually happened was something like this:
crontab
rather than:
crontab -l

The command waited until an EOF was received and then dutifully wrote a null crontab for the effective user.

The effect would be exactly the same if someone edited the crontab file directly and nulled the file. Unlike the first case, you wouldn't even know it had been done until the system were rebooted because the cron daemons in-memory image would be intact.

An easy way to determine if the problem was in any way related to the reboot would be to examine your backups. If the files on backup are null then the damage was done before the reboot.
If it ain't broke, I can fix that.
Patrick Wallek
Honored Contributor

Re: crontab entry erased

A users crontab should not get erased because of a reboot. Have a look through /etc/rc.log.old (shutdown messages) and /etc/rc.log (bootup messages) and see if there is anything in either of those are cron and/or crontab files.

You should find the entries for cron shutdown and startup, but that should be all. Any other cron/crontab entries are not normal.
sherinchandy
Advisor

Re: crontab entry erased

crontab has been restored from backup only so
erase happened while reboot only.

Nothing specific could be find from rc.log

but after patching its has updated cron also while software configuration phase.

Configuring all unconfigured software filesets
Output from "/sbin/rc2.d/S120swconfig start":
----------------------------
* The following files, which could not be closed by swinstall when they
were updated, are being removed now:
/usr/lib/#libfmtbtlan.1

/usr/lib/sw/lib/#libcma.2
/usr/sbin/#lpsched
/usr/sbin/#cron
/usr/lib/#libnss_dns.1
/usr/sbin/#inetd

Jov
Honored Contributor

Re: crontab entry erased

That still does not prove it erased the cron files under /var/spool.

Do you have the patch id related to the cron update.


Jov