Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.
*/5 * * * * root ./temp.sh

The above must be run as root,how to make it work for all users?

share|improve this question

3 Answers 3

add it to your global crontab in /etc/crontab

share|improve this answer
su - 
crontab -e
share|improve this answer

use sudo to run it and configure temp.sh in sudoers with the NOPASSWD option.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.