sudo and cron

On the Mac OS X you cannot run as root, you have to use sudo every time. If you want to put something in your cron, this can be difficult.
One solution is to use visudo and the sudoers.

On Fedora, you will have to remove Defaults requiretty from the /etc/sudoers.
Otherwise you will get the error : sudo: sorry, you must have a tty to run sudo

Thanks to : ProgX and Google.

2 Responses to sudo and cron

  1. darkxnes says:

    Comente a linha #Default requiretty em /etc/sudoers

  2. Fedorauser says:

    thank u wery much for advice!!!

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: