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



Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
cron job starts new cron proccess ron76 SUN Solaris 3 05-12-2008 01:07 AM
Cron and Pseudo-Cron dingusmcghee UNIX for Dummies Questions & Answers 1 01-31-2008 12:58 PM
CRON usage for CRON job skyineyes UNIX for Dummies Questions & Answers 1 01-17-2008 10:17 AM
AIX and cron logs filtering ?: /etc/cronlog.conf, /var/adm/cron/log Keith Johnson AIX 0 01-09-2008 08:32 PM
Cron : you are not authorized to use cron. Sorry. tt155 UNIX for Advanced & Expert Users 1 07-06-2005 10:37 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-06-2008
dannyd dannyd is offline
Registered User
  
 

Join Date: Feb 2007
Posts: 20
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 ?
  #2 (permalink)  
Old 03-06-2008
Artur Zaworski Artur Zaworski is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 6
If you want to start cron job as root - add it to root crontab (man -a crontab)
cron daemon is running as root.
  #3 (permalink)  
Old 03-06-2008
dannyd dannyd is offline
Registered User
  
 

Join Date: Feb 2007
Posts: 20
I did have the entry in crontab. Below is the exact line in my crontab.

40 12 * * * /usr/local/cron/script
  #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
  #5 (permalink)  
Old 03-06-2008
Artur Zaworski Artur Zaworski is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 6
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.

Last edited by Artur Zaworski; 03-06-2008 at 02:32 PM.. Reason: spelling
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 08:39 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0