LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-26-2009, 09:17 AM   #1
CliffordTrueman
LQ Newbie
 
Registered: Jun 2009
Posts: 11

Rep: Reputation: 0
Crontab not functioning after Bastille Lockdown


So my cronjobs were working before I used Bastille lockdown on a particular box checked a few things so far:

/var/log/cron - the daemon is running and logs the command I want to run

The command it's self is valid, and runs fine

I have checked cron.allow and cron.deny - I'm not sure if in here lies my issue I had several things placed in my .deny file by the lockdown, however I added root to the cron.allow, tested, no joy, renamed both allow and deny and tested again No joy.


I'm not sure were to go next, any suggestions?
 
Old 08-26-2009, 09:36 AM   #2
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by CliffordTrueman View Post
So my cronjobs were working before I used Bastille lockdown on a particular box checked a few things so far:

/var/log/cron - the daemon is running and logs the command I want to run

The command it's self is valid, and runs fine

I have checked cron.allow and cron.deny - I'm not sure if in here lies my issue I had several things placed in my .deny file by the lockdown, however I added root to the cron.allow, tested, no joy, renamed both allow and deny and tested again No joy.


I'm not sure were to go next, any suggestions?

if the command is being logged in /var/log/cron since the bastille lock down, then the issue is not with the cron.allow or cron.deny files.

root is allowed to always run cron anyway
does bastille have some sort of log you can look at?
 
Old 08-26-2009, 11:13 AM   #3
CliffordTrueman
LQ Newbie
 
Registered: Jun 2009
Posts: 11

Original Poster
Rep: Reputation: 0
I believe it does, let me try and find out if there is anything in there.
 
Old 08-26-2009, 11:29 AM   #4
CliffordTrueman
LQ Newbie
 
Registered: Jun 2009
Posts: 11

Original Poster
Rep: Reputation: 0
I don't even see anything in the script that seems like it would change anything to do with cron, I'm only hypothesizing that the lockdown broke it anyway.
 
Old 08-26-2009, 12:43 PM   #5
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
What is it your cronjobs are doing? They're being logged upon execution, so perhaps they are simply not working as you would expect.

Check mail for the user who the cronjobs are running as. (stdout/stderr from cronjobs goes there by default.)
 
Old 08-27-2009, 08:28 AM   #6
CliffordTrueman
LQ Newbie
 
Registered: Jun 2009
Posts: 11

Original Poster
Rep: Reputation: 0
the cron log says their are launching, but the process never starts, I see the following error message


audit(1251379441.263:143): avc: denied { lock } for pid=18654 comm="exim" path="/var/spool/exim/db/retry.lockfile" dev=cciss/c0d0p2 ino=26804412 scontext=system_u:system_r:system_mail_t:s0-s0:c0.c1023 tcontext=user_ubject_r:var_spool_t:s0 tclass=file

system isn't running sendmail, is it possible that it's cron is trying to use mail and failing?
 
Old 08-27-2009, 09:25 AM   #7
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
That's an selinux issue. It may simply be that since cron sends stderr/stdout to the user that runs cron as an email that it is trying to open exim, being denied by your selinux policy, and therefore not running the actual program. Try allowing that selinux path and see if that fixes things. If you don't know how to do this, write back.

HTH

Forrest
 
Old 08-27-2009, 08:18 PM   #8
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
@forestt, time to change your sig
PS Welcome to the 1K+ club
 
Old 08-28-2009, 08:40 AM   #9
CliffordTrueman
LQ Newbie
 
Registered: Jun 2009
Posts: 11

Original Poster
Rep: Reputation: 0
Well, Selinux is in permissive mode, and I don't have sendmail running on this box, could that be a problem?
 
Old 08-28-2009, 08:48 AM   #10
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
OK, the permissive is the reason it is logging the string (basically, permissive means show me what you would not allow in the audit log, but let me do it anyway).

The line says, 'comm="exim" path="/var/spool/exim/db/retry.lockfile"'. That means it is trying to run exim (which is a sendmail replacement). I'm guessing that you do have exim running, but even if you don't, it shouldn't stop cron. Perhaps it is simply that the lockfile is stopping things from running. Try shutting down exim, removing the lockfile and then restarting exim. May not help, but that shouldn't hurt anything either.

Let us know,

Forrest

p.s. Yeah chrism01 I noticed that in another post. Is this better
 
Old 08-31-2009, 12:58 AM   #11
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
I like guy with ambition
 
Old 09-08-2009, 10:55 AM   #12
CliffordTrueman
LQ Newbie
 
Registered: Jun 2009
Posts: 11

Original Poster
Rep: Reputation: 0
So I'm looking at the latest log info and that Selinux message about exim has no correlation to my crontab, guess it was just coincidence that I saw the two at the same time.. So I"m stumped... I have no idea why my crontab isn't running.
 
  


Reply



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
ftp lockdown frznchckn Linux - Security 5 05-17-2009 10:24 AM
FreeBSD lockdown?? fatum112 *BSD 12 08-03-2006 06:59 AM
Best way to lockdown users The_JinJ Linux - Newbie 1 10-12-2005 06:46 PM
Lockdown Obie Linux - Security 10 07-30-2004 03:07 AM
Lockdown or not? neil Linux - Security 5 04-08-2002 02:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:51 PM.

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
Open Source Consulting | Domain Registration