首页 > 其他 > 详细

xxx is not in the sudoers file.This incident will be reported.的解决方法 (一般用户不能执行sudo)

时间:2016-02-02 00:01:41      阅读:306      评论:0      收藏:0      [点我收藏+]

1.切换到root用户下


2.添加sudo文件的写权限,命令是:
chmod u+w /etc/sudoers


3.编辑sudoers文件
vi /etc/sudoers
找到这行 root ALL=(ALL) ALL,在他下面添加xxx ALL=(ALL) ALL (这里的xxx是你的用户名)
ps:这里说下你可以sudoers添加下面四行中任意一条
youuser            ALL=(ALL)                ALL
%youuser           ALL=(ALL)                ALL
youuser            ALL=(ALL)                NOPASSWD: ALL
%youuser           ALL=(ALL)                NOPASSWD: ALL
第一行:允许用户youuser执行sudo命令(需要输入密码).
第二行:允许用户组youuser里面的用户执行sudo命令(需要输入密码).
第三行:允许用户youuser执行sudo命令,并且在执行的时候不输入密码.
第四行:允许用户组youuser里面的用户执行sudo命令,并且在执行的时候不输入密码.


4.撤销sudoers文件写权限,命令:
chmod u-w /etc/sudoers

xxx is not in the sudoers file.This incident will be reported.的解决方法 (一般用户不能执行sudo)

原文:http://www.cnblogs.com/app-lin/p/5176538.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!