cron jobs do not take any environment setting from
the profile files. Probably you need to set proper
environment variables like PATH,SSH_TTY etc.
You may try by giving these
enviroments in your cron script
--- Bhuvan A <bhuvanbk@xxxxxxxxxxxxx> wrote: > > >
For your reference here is the sequence of
commands been executed in my
> $ ssh my_user@my_host tar -zcf mytar.tgz
> $ scp my_user@my_host:mytar.tgz /tmp//mnt/part6; sleep 3; mv mytar.tgz
> $ su root -c "mount -t ext2 -v /dev/hda6
> my_partion_dir -v; umount -v /mnt/part6"am unable to narrow down
> I suppose the problem is while doing su. But i
> the same. Hope to get some lights.standard
The problem is with su. When running su, the
input must be a tty (to read the password). sucannot receive
input from a pipe, or redirected file. Also, thereis no mention
in the manual about getting the password from afile.
But anyway i am not using pipe or redirection in my
command. BTW, in
normal case it wont query for password, since the
user is belong to wheel
group and all the users of wheel group are trusted.
Again, if i run my
script from command prompt it runs fine as it is
expected to (it wont
query for password). The problem is while running in
crond. Any other
To unsubscribe email
"unsubscribe <password> address"
in the subject or body of the message.