Crontab cannot run by non-root user | Unix Linux Forums | AIX

  Go Back    


AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace.

Crontab cannot run by non-root user

AIX


Tags
aix, unix

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 08-19-2007
kwliew999 kwliew999 is offline
Registered User
 
Join Date: Jun 2007
Last Activity: 24 July 2014, 9:09 PM EDT
Posts: 56
Thanks: 0
Thanked 0 Times in 0 Posts
Crontab cannot run by non-root user

Good morning everybody. I have just receiedv a complaint from our DBA saying that if he create a scripts to run some Oracle performance scripts using crontab and the scheduling part is ok but the job is failed when I checked on /var/adm/cron/log.
I have tried his scripts using Oracle id directly run on shell and everything is ok. But when I set the cron job and the job will fail.
Question :
1) How to check what is the error message for the cron job failed? When I check the log, the only thing it showed is "failed" with no reason.
2) I have also done the checking on whether Oracle is able to run the cron job by checking on cron.allow and cron.deny. Both are ok. I also check on /etc/security/user file whether the deamon of oracle is on "true" and yes, it is. And Oracle is also having sub-group of cron group.
So, is there anything else I can check to find out why the cron job failed?

Tq in advance.
Sponsored Links
    #2  
Old 08-20-2007
joerg's Avatar
joerg joerg is offline
Registered User
 
Join Date: Jan 2002
Last Activity: 22 March 2010, 3:32 AM EDT
Location: Germany
Posts: 168
Thanks: 0
Thanked 0 Times in 0 Posts
mailx (Solaris)

Hi,
my OS is Solaris but you can try to check the mail account of the user you setup the cronjob.
In solaris the default logging is the mail account (mailx).
Best regards
joerg
Sponsored Links
    #3  
Old 08-20-2007
kwliew999 kwliew999 is offline
Registered User
 
Join Date: Jun 2007
Last Activity: 24 July 2014, 9:09 PM EDT
Posts: 56
Thanks: 0
Thanked 0 Times in 0 Posts
Thank you very much for the help. I have finally found the error.
Yes, the error log will post in the mail.
The reason of why it doesn't run is due to eventhough we are using Oracle id to create the cron job, it doesn't mean the job will be run by Oracle priviledge. Thus, to run a Oracle job, we need some setting on the scripts which we did n't do it as normally we run the script using Oracle ID directly and all setting already provided when we sign in as Oracle.
Tq.
    #4  
Old 05-02-2009
sur1805 sur1805 is offline
Registered User
 
Join Date: May 2009
Last Activity: 2 May 2009, 2:13 AM EDT
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Hi kwliew999,

I m also having the same problem.I m running the backupscript through cron with oracle user. but it is giving "sqlplus command not found" . can u tell me what parameter u set in script?
Early reply is awaited.

Thanks in advance.
Surendra
Sponsored Links
    #5  
Old 05-02-2009
garethr garethr is offline
Registered User
 
Join Date: May 2009
Last Activity: 17 April 2012, 11:28 AM EDT
Location: England
Posts: 97
Thanks: 0
Thanked 2 Times in 1 Post
@sur1805
It sounds like your PATH environment variable is not set correctly. You may want to specify the full path to the sqlplus command in the crontab, or make it in to a script which sets this before running sqlplus.
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Bad user root in crontab ijustneeda Solaris 12 05-10-2012 08:20 AM
Sudo to delegate permission from non-root user to another non-root user canar UNIX for Dummies Questions & Answers 1 04-06-2012 05:59 PM
Editing crontab of non-root user from file nivedhitha UNIX for Dummies Questions & Answers 6 08-25-2011 07:19 AM
If user has own crontab, results in accumulation of root CRON processes Narnie UNIX for Dummies Questions & Answers 12 02-10-2010 07:10 PM
Possible to give non root user sudo to "crontab -l" LordJezoX UNIX for Dummies Questions & Answers 4 10-10-2008 02:02 PM



All times are GMT -4. The time now is 02:16 PM.