很奇怪为什么明明用sudo可以执行成功脚本,但脚本自己不能自动运行.
原来是如下sudoers里面的如下设置未被注释
#
# Disable "ssh hostname sudo <cmd>", because it will show the password in clear.
# You have to run "ssh -t hostname sudo <cmd>".
#
# Defaults requiretty
原文地址:https://www.cnblogs.com/linyoudubu/p/8893454.html
时间: 2024-10-28 18:14:59