需要在/etc/sudoers中配置。 
这个文件的权限是r/r/n,配置之前需要加写权限。

sudo chmod u+w /etc/sudoers

免密码的配置可以找到样例

root    ALL=(ALL) ALL

%wheel ALL=(ALL) NOPASSWD: ALL 

%应该是指组,没有%指代的是用户。

既然原来权限是r/r/,修改之后最好也改回来。

sudo chmod u-w /etc/sudoers

亲测有效!!相关文档:https://www.cnblogs.com/mianbaoshu/p/9449095.html

相关文章:

  • 2022-01-06
  • 2022-12-23
  • 2021-12-09
  • 2021-06-13
  • 2021-05-16
  • 2022-12-23
  • 2022-02-10
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-03-10
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案