LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-10-2011, 05:45 AM   #1
tonj
Member
 
Registered: Sep 2008
Posts: 505

Rep: Reputation: 37
centos 4.9 @reboot jobs


I run a raq4 server on centos 4.9 and every day it sends me a log report by email. In todays log I noticed an entry I haven't seem before. It reads:

STARTUP (V5.0)
INFO (@reboot jobs will be run at computer's startup.)
STARTUP (V5.0)
INFO (@reboot jobs will be run at computer's startup.)

how can I find out what these reboot jobs are? I want to make sure I haven't been hacked or anything.
 
Old 11-10-2011, 01:51 PM   #2
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
Hi,

these jobs are probably at CRON, which you can list with:
Code:
crontab -l
 
Old 11-11-2011, 05:56 AM   #3
tonj
Member
 
Registered: Sep 2008
Posts: 505

Original Poster
Rep: Reputation: 37
thanks for that but crontab -l just gives me
# crontab -l
no crontab for root
 
Old 11-11-2011, 06:29 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590
'grep @reboot -r /var/spool/cron/'?
 
Old 11-11-2011, 06:44 AM   #5
tonj
Member
 
Registered: Sep 2008
Posts: 505

Original Poster
Rep: Reputation: 37
thanks but grep @reboot -r /var/spool/cron/ does nothing.
the cursor just drops to the next line and that's all.
 
Old 11-11-2011, 07:20 AM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590
Then try searching more locations: 'grep @reboot -r /etc /root /tmp /var /home'. Might take some time. If that doesn't return anything try searching /usr.

* As you have noticed /root itself doesn't have any crontab. Good. If you have inspected every cronjob in all /etc/cron.* directories you could temporarily populate /etc/cron.allow with ONLY user accounts you absolutely trust to run cron jobs. This should stop anyone else from trying stuff. If you can not trust any system or unprivileged users right now then only add root: 'rm -f /etc/cron.deny; echo root > /etc/cron.allow'.
 
Old 11-12-2011, 06:21 AM   #7
tonj
Member
 
Registered: Sep 2008
Posts: 505

Original Poster
Rep: Reputation: 37
I had a dig around and the only entry I could find that responded was:

# grep @reboot -r /var/log/cron
Nov 9 00:28:30 home crond[30811]: (CRON) INFO (@reboot jobs will be run at computer's startup.)
Nov 9 00:28:33 home crond[30866]: (CRON) INFO (@reboot jobs will be run at computer's startup.)
so I took a look inside the cron file and found the lines that contained 30811 and 30866 but they were just a duplicate of the above like so:
Nov 9 00:28:30 home crond[30811]: (CRON) STARTUP (V5.0)
Nov 9 00:28:30 home crond[30811]: (CRON) INFO (@reboot jobs will be run at computer's startup.)
Nov 9 00:28:33 home crond[30866]: (CRON) STARTUP (V5.0)
Nov 9 00:28:33 home crond[30866]: (CRON) INFO (@reboot jobs will be run at computer's startup.)
I'm still struggling to know what the @reboot jobs are.
 
Old 11-12-2011, 06:57 AM   #8
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590
Quote:
Originally Posted by tonj View Post
I had a dig around and the only entry I could find that responded was:
# grep @reboot -r /var/log/cron
(..)
You didn't tell us what command you ran. I'll assert you ran what I posted and also searched in /usr. Since it doesn't return any other than /var/log/cron I'll assert there aren't any and the cron daemon message of the informational level is just to inform you when that type of job will be run:
Code:
static void run_reboot_jobs(cron_db * db) {
	user *u;
	entry *e;
	int reboot;
	pid_t pid = getpid();

	/* lock exist - skip reboot jobs */
	if (access(REBOOT_LOCK, F_OK) == 0) {
		log_it("CRON", pid, "INFO",
			"@reboot jobs will be run at computer's startup.", 0);
		return;
	}
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CentOS Stalls on reboot after power failure. Creata Linux - Server 5 07-31-2012 03:38 AM
After fresh install and reboot, i get a black screen! PLEASE HELP! CENTOS 5.5 patrick_004 Red Hat 3 03-08-2011 03:22 AM
CentOS/Xen domU reverts to DHCP upon reboot andrewboring Linux - Server 12 02-01-2011 01:13 AM
Linux CentOS 5 black screen when make reboot LinuxNewbie81 Linux - Newbie 2 10-19-2010 05:30 PM
(noob) wusb54g v4 w/ndiswrapper 1.25 doesn't work after reboot. CentOS 4.4 Kaktrot Linux - Wireless Networking 5 10-17-2006 07:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration