我阅读了serverfault上的所有sudo帖子,但我仍然无法弄清楚我做错了什么.通常我终于找到解决方案但不是这次:
@H_301_2@我希望apache用户能够以“hremotessh”用户身份执行此命令:
sudo /home/hremotessh/scripts/redirect.sh 8892 8893@H_301_2@因此我在visudo中添加了这个:
apache ALL=(hremotessh) NOPASSWD: /home/hremotessh/scripts/redirect.sh@H_301_2@但是sudo还在问密码吗?
sudo /home/hremotessh/scripts/redirect.sh [sudo] password for apache:@H_301_2@我试过这个,但不是更好:
sudo -u hremotessh /home/hremotessh/scripts/redirect.sh hremotessh is not in the sudoers file. This incident will be reported.@H_301_2@任何想法都会受到热烈欢迎:-) @H_301_2@丹尼斯