sudo的配置文件位于 /etc/sudoers 里面。具体操作如下:

打开sudoers文件。

bo@engineer ~/ $ sudo nano /etc/sudoers

假定你的用户名为  myuser, 则在sudoers 文件中添加一下信息。

myuser ALL=(ALL) NOPASSWD: ALL

保存退出即可。

 

此外也可以直接采用 echo 指令

bo@engineer ~/ $ echo "test ALL=(ALL) NOPASSWD: ALL" >>/etc/sudoers

可实现同样的作用。

 

相关文章:

  • 2022-12-23
  • 2021-06-11
  • 2021-07-10
  • 2022-12-23
  • 2022-01-02
  • 2021-08-19
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-19
  • 2021-12-09
  • 2022-12-23
  • 2022-12-23
  • 2021-10-09
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案