Originally Posted by fukawi1
Its my understanding, that if you run
as any user, then it creates a crontab for that user, and anything runs as that user.. At least, that is how it appears to be for my FC15 box. Am I correct in my understanding?
That is correct, but this command opens the default editor which is in most cases vi
, and that could be surprising for users who don't how to use or get out of vi. crontab -e
is the recommended and only correct way to edit a personal crontab from the command line though.
The shutdown command has to be run as root, and it really fits better in the system-wide /etc/crontab. If you are right and shutdown can be run by a member of the sudoers group a personal crontab might work, but it makes the system less transparent. You don't want to go through a dozen crontabs to see who is responsible for shutting down the machine.