sudo: Sorry, you must have a tty to run

Posted longchang

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sudo: Sorry, you must have a tty to run相关的知识,希望对你有一定的参考价值。

The requiretty option in sudoers file

The requiretty if set in sudo config file sudoers, sudo will only run when the user is logged in to a real tty. When this flag is set, sudo can only be run from a login session and not via other means such as cron, shell/perl/python or cgi-bin scripts. This flag is set on many distores by default. Edit /etc/sudoers, file, enter:
# visudo
Find line that read as follows:

Defaults    requiretty

Either comment it out the line or delete the line:

#Defaults    requiretty

Save and close the file.

以上是关于sudo: Sorry, you must have a tty to run的主要内容,如果未能解决你的问题,请参考以下文章

-bash: /etc/bashrc: Permission denied sudo: sorry, you must have a tty to run sudo 报错解决

# tail -f /var/log/zabbix/zabbix_agentd.log sudo: sorry, you must have a tty to run sudo

sorry you must accept the license agreement before

下载JDK的时候提示you must accept the license agreement before downloading,如何处理??

PHP查询数据库较慢,nginx 超时 返回 504:Sorry, the page you are looking for is currently unavailable.

I'm sorry to tell you that I have to work overtime.you see my job is _____