View Single Post
Posts: 187 | Thanked: 345 times | Joined on Nov 2009
#278
Originally Posted by gabby131 View Post
on the command section, how can i schedule a command that needs root? thanks
Write a new script (a text file, for example called "myscript.sh") and place it in /home/user/. Put whatever you want to execute into that script. Then do this:

Code:
chown root /home/user/myscript.sh
chmod 4755 /home/user/myscript.sh
Now put "/home/user/myscript.sh" into the command line execution. It will be executed as root.
__________________
Author of:
  • The "Alarmed" scheduling and automation app. (Supports alarms, switching profiles, resetting the GPRS counter, setting custom commands to go off, cron syntax and much more. GUI and CLI).
  • "Reaction face-off", a two-player puzzle/knowledge/reaction game.
  • "ytcli", a simple but effective command line youtube client which allows you to play videos from the CLI instantly or download videos on a queue.
 

The Following 5 Users Say Thank You to shapeshifter For This Useful Post: