Operating System - HP-UX
1753865 Members
7315 Online
108809 Solutions
New Discussion юеВ

Re: cron executes under root not the user who created it

 
SOLVED
Go to solution
prasadb
Super Advisor

Re: cron executes under root not the user who created it

is there proper entry of the user in

/var/adm/cron/cron.allow

check whether the intended user name exists in this file


fsumair_1
Advisor

Re: cron executes under root not the user who created it

Yes user exists.
SANTOSH S. MHASKAR
Trusted Contributor
Solution

Re: cron executes under root not the user who created it

Hi Sam,

Just check the . in

./home/crontest/.profle

this . means current directory.

so if u r not running

#./home/crontest/.profle;/home/crontest/test.sh


under root directory '/'

also as suggested by James

#. /home/crontest/.profle;/home/crontest/test.sh

note the space after .

it sets .profiles env in ur present shell instead of creating new one.

also setting shell env. in the script is always better
than calling .profile before the script.

Just set all required variables/env. in the
script itself.

-Santosh
fsumair_1
Advisor

Re: cron executes under root not the user who created it

Thanks Santosh James and all other for help.

Problem is solved.