Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Runs fine on cmd line but not in cron

Re: Runs fine on cmd line but not in cron

From: Jim Harrison <jim_at_colway.freeserve.co.uk>
Date: 2000/06/21
Message-ID: <8iqub3$lle$1@news8.svr.pol.co.uk>#1/1

I agree. I don't think it work either, since some kind of environment script would need to run prior to running the script (such as .profile). In which case you may as well set-up that users crontab entry.

--
Jim Harrison
Colway Software and Design
www.colway.net
Tom Phoenix <rootbeer_at_redcat.com> wrote in message
news:Pine.GSO.4.10.10006200955040.29843-100000_at_user2.teleport.com...

> On Tue, 20 Jun 2000, Jim Harrison wrote:
>
> > Tom Phoenix <rootbeer_at_redcat.com> wrote in message
> > news:Pine.GSO.4.10.10006181013480.29843-100000_at_user2.teleport.com...
> > > On Sun, 18 Jun 2000, John wrote:
> > >
> > > > Your cron job could run a shell script which just does an su -c
<user>
> > > > to run the shell script you really want to run under a user which
has
> > > > the right environment already.
> > >
> > > It's probably not wise or possible to run that program as the
superuser.
> > > And will that make a login shell? Probably not by default. Of course,
if
> > > you're going to run a shell script, it should be simple to source the
> > > initialization file and be done with it; there's no need to run as
root
> > > and then use 'su'. Oh, well!

> > The words stick and wrong end come to mind.
>
> The word "huh?" comes to mind. :-)
>
> > The su command also allows you to log in as any UNIX user not just
> > root as you suggest!
>
> Maybe I was unclear. A non-root user can't "log in" with 'su' as any other
> user from a shell script, as a password would be required. Although root
> could get away without using a password, it is "probably not wise or
> possible to run that program as the superuser." Right?
>
> > I believe John was suggesting logging into another user account.
>
> I do, too. I just don't think it's the right thing to do, if it's even
> possible.
>
> Cheers!
>
> --
> Tom Phoenix Perl Training and Hacking Esperanto
> Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
>
Received on Wed Jun 21 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US