当前位置: 代码迷 >> Linux/Unix >> linux * is not in the sudoers file. This incident will be reported
  详细解决方案

linux * is not in the sudoers file. This incident will be reported

热度:7985   发布时间:2013-02-26 00:00:00.0
linux *** is not in the sudoers file. This incident will be reported.
当想要编辑一个只读文件时我输入 sudo **** 再输入密码 结果出现了这样的问题
原因写的很清楚是:因为我当前的用户没有写在 sudoers 这个文件中
1.那么首先我们要确定这个文件在哪? ——- 一般都在 etc/sudoers
2.由于这些文件一也是只读的所以我们要切换超级用户来编辑这个sudoers文件. 执行命令:su root 再输入密码
3.编辑sudoers这个文件 vim sudoers 找到这一行:”root ALL=(ALL) ALL”在起下面添加”xxx ALL=(ALL) ALL”(这里的xxx是你的用户名),然后保存.
  相关解决方案