- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Crontab entries disappeared
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
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
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
07-23-2009 01:21 AM
07-23-2009 01:21 AM
One of my user's crontab entry went empty this morning.All the entries contained for that particular user disappeared. I dont know what happened in the middle.
I do checked in /var/spool/cron/crontabs/user
and /var/adm/cron/crontabs/user, where i do see a 0 byte file. But other user file contain a valid cron entries.
Please help me in solving this issue...
Thanks in advance,
Din
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2009 01:36 AM
07-23-2009 01:36 AM
Re: Crontab entries disappeared
please check below logs for any entries for this user.
/var/adm/cron/log
/var/adm/syslog/syslog.log
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2009 01:37 AM
07-23-2009 01:37 AM
Re: Crontab entries disappeared
Look like your crontab file got corrupted for the user.Or someone has remove it
Regards
Sunny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2009 02:07 AM
07-23-2009 02:07 AM
SolutionItâ s difficult to retrieve the crontab entries.
But If you have ignite backup or contab.old
Check the
1) crontab file permission.
2) Check crontab.allow file
3) Check .sh_history if anybody enter crontab -r
Action need to be taken
1) check and update the permission
2) check and update corntab.allow file
3) Take a backup before editing crontab file along with date
4) Put the below script, so you have full proof backup of crontab file.
Script
mailto="xxxxxx@xxxxx.com"
for file in `crontab -l | grep -v '^#'| awk '{print $6}'`
do
echo
echo "-------- ${file}" >> /crontabdetails
echo >> /crontabdetails
cat $file >> /crontabdetails
echo >> /crontabdetails
done
mailx -s "Crontab List" xxxxx@xxxx.com < /crontabdetails
Hope this will help
Prashant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2009 02:41 AM
07-23-2009 02:41 AM
Re: Crontab entries disappeared
As you said, i have found a crontab -r command in .sh_history from that user around that time.
But somehow i have managed to restore that particular user's crontab file from yesterday's backup, and now it's working fine.
Thanks for your support.
Thanks and Regards,
Din