Privileged command as part of cronjob
- by user42756
Hi,
I'm facing a weired problem on a unix-based machine. Here is the story:
I have a personal username/password on a unix machine with limited privileges. Whenever I need to execute some commands I have to substitute user using the su command, then I execute it normally.
Now, I need to add a cronjob that uses such privileged commands so I added the cronjob on the crontab of the user I substituted to in order to have access to these commands.
Strangely, it turned out to me that these commands fail to run for some reason as a cronjob although when I execute them directly from shell (after su) they work seamlessly.
Why does this happen? Why do these commands not work as part of cronjobs?
Thank you