sudo: sorry, you must have a tty to run sudo pssh
2016-08-10 14:43
846 查看
真实场景是在执行pssh的时候,在远端服务器执行sudo命令,有如下报错:
$ pssh -h testlist.txt -l fisher "sudo uptime"
[1] 12:33:14 [FAILURE] 10.20.30.40 Exited with error code 1
网上搜了一下,解决办法是编辑 /etc/sudoers 文件,将Default requiretty注释掉。
sudo vi /etc/sudoers
#Default requiretty #注释掉 Default requiretty 一行
具体操作:
http://www.sudops.com/you-must-have-a-tty-to-run-sudo.html
$ pssh -h testlist.txt -l fisher "sudo uptime"
[1] 12:33:14 [FAILURE] 10.20.30.40 Exited with error code 1
网上搜了一下,解决办法是编辑 /etc/sudoers 文件,将Default requiretty注释掉。
sudo vi /etc/sudoers
#Default requiretty #注释掉 Default requiretty 一行
具体操作:
1 2 | sudo sed -i 's/Defaults requiretty/#Defaults requiretty/g' /etc/sudoers sudo cat /etc/sudoers | grep requiretty |
相关文章推荐
- 远程sudo错误:sudo: sorry, you must have a tty to run sudo
- sudo: sorry, you must have a tty to run sudo
- 解决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
- 浏览器中调用PHP在执行linux sudo指令时报sudo: sorry, you must have a tty to run sudo
- sudo: sorry, you must have a tty to run sudo
- sudo: sorry, you must have a tty to run sudo
- sudo: sorry, you must have a tty to run sudo
- sudo: sorry, you must have a tty to run sudo
- sudo: sorry, you must have a tty to run sudo
- sudo:sorry,you must have a tty to run sudo
- sudo: Sorry, you must have a tty to run sudo Error on a Linux and Unix
- sudo: sorry, you must have a tty to run sudo
- sudo: sorry, you must have a tty to run sudo
- sorry,you must have a tty to run sudo
- sudo: sorry, you must have a tty to run sudo
- 解决sudo: sorry, you must have a tty to run sudo
- centos6.x86_64 启动自动执行脚本错误sudo: sorry, you must have a tty to run sudo
- 问题解决:sudo: sorry, you must have a tty to run sudo