我编辑/ etc / sudoers使用visudo命令,以授予用户sudo特权没有密码如下:
userName ALL=(ALL:ALL) NOPASSWD:ALL
但是这对我没有用,
任何build议提前致谢
确保在你提到的规则下面没有规则覆盖它。 从man sudoers (1.7.2p2):
When multiple entries match for a user, they are applied in order. Where there are multiple matches, the last match is used (which is not necessarily the most specific match).
尝试
userName ALL = NOPASSWD: ALL