The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > Linux
.
google unix.com




Thread: cron job
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 03-06-2008
HPAVC's Avatar
HPAVC HPAVC is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 106
Quote:
Originally Posted by dannyd View Post
Im not a pro bu I think the cronjob isn't running as the root user. How can I specify a cron job to run as root ?
investigate exactly what crontab is running those orphan tasks (from /var/spool/cron/crontab?) Looking at "ps -aux|grep cron" should tell you what cron is running as.

Sometimes an install of an application (lets say mailman) creates a user and installs a crontab entry, then you ditch the mailman account and its home directory manually keeping the crontab in place (though this would be an old or bad version of cron that would allow for such thing)

You could also look at this syntax to make sure ...
Code:
# m h dom mon dow user  command
17 *    * * *   root    /usr/sbin/thing
@hourly root /usr/sbin/otherthing