Sep 09 2008

sudo: sorry, you must have a tty to run sudo

Category: 乱up当秘笈ssmax @ 18:18:46

crontab的时候sudo经常会碰到这个情况,其实修改一下sudo的配置就好了

vi /etc/sudoers (最好用visudo命令)
注释掉 Default requiretty 一行
#Default requiretty

意思就是sudo默认需要tty终端。注释掉就可以在后台执行了。

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.