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


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

相关内容

    暂无相关文章