Re: Using OS_Authentication in cron jobs

From: Miles Thomas <thomasm_at_logica.com>
Date: 1996/10/18
Message-ID: <54803u$bmj_at_romeo.logica.co.uk>#1/1


In article <326673D8.41F8_at_mach2.wlu.ca>,

   Brad Baker <bbaker_at_mach2.wlu.ca> wrote:
>I'm looking into using os_authentication for the purposes of running
>cron jobs which run a sql script through sqlplus. When the appropriate
>user invokes the shell script from the unix command prompt, the script
>runs to completion with no errors. However, when the same shell is
>invoked by the cron facility, I receive an invalid username/password
>message. Any ideas as to the possible problem? Has anyone implemented
>a similar setup?
>
>Thanks for any help...
>Brad Baker

The problem you may be experiencing here is to do with how cron handles userids. As far as I remember, crond is run by root/bin or some other user, and changes its user id when it spawns each cron job. (Write a little program which determines what the UID, effective UID, and Login UID are, and run it in a cron job). I suspect that cron is probably only setting effective UID, while oracle is looking at UID, and hence trying to logon as OPS$ROOT or some such. (And its not a good idea to create an OPS$ROOT account!)

Any other ideas?
Miles Thomas
Logica UK Ltd
These opinions are not necessarily those of my employer. Received on Fri Oct 18 1996 - 00:00:00 CEST

Original text of this message