当我们使用sudo命令切换用户的时候可能会遇到提示以下错误:
xxx is not in the sudoers file. This incident will be reported,
xxx是你当前的用户名,究其原因是用户没有加入到sudo的配置文件里

 

 

解决方法:
切换到root用户,
$ su -
$ visudo
在打开的配置文件中,找到root ALL=(ALL) ALL,在下面添加一行
xxx ALL=(ALL) ALL 其中xxx是你要加入的用户名称

输入:wq保存并退出配置文件,
再次使用sudo命令就不会有上面的提示了。

相关文章:

  • 2021-11-09
  • 2022-01-28
  • 2021-10-18
  • 2022-12-23
  • 2023-02-08
  • 2021-10-15
猜你喜欢
  • 2021-11-14
  • 2021-12-16
  • 2022-12-23
  • 2022-03-07
  • 2021-05-24
  • 2022-12-23
  • 2021-08-02
相关资源
相似解决方案