cron job

In my var/log/cron file Im getting this error:

Mar 6 11:57:01 intranet crond[2286]: (tmp.XXXXGHJVjz) ORPHAN (no passwd entry)
Mar 6 11:57:01 intranet crond[2286]: (root) RELOAD (cron/root)
Mar 6 11:57:01 intranet crond[2286]: (tmp.XXXXFqiL6E) ORPHAN (no passwd entry)

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 ?

If you want to start cron job as root - add it to root crontab (man -a crontab)
cron daemon is running as root.

I did have the entry in crontab. Below is the exact line in my crontab.

40 12 * * * /usr/local/cron/script

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 ...

# m h dom mon dow user  command
17 *    * * *   root    /usr/sbin/thing
@hourly root /usr/sbin/otherthing

Is it your crontab or root's crontab? If it belongs to root - will be started as root. If it belongs to you - will be started as you.

Regards,
-Artur.