xxx is not in the sudoers file.This incident will be reported.的解决方法

作者:佚名 上传时间:2019-06-01 版权申诉

本文转自: http://www.cnblogs.com/zox2011/archive/2013/05/28/3103824.html

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

这样普通用户就可以使用sudo了.

免责申明:文章和图片全部来源于公开网络,如有侵权,请通知删除 server@dude6.com

用户评论
相关推荐
xxx is not in the sudoers file.This incident will be reported.解决方法
本文转自: http://www.cnblogs.com/zox2011/archive/2013/05/28/3103824.html
xxx is not in the sudoers file.This incident will be reported.解决方法
本文转自: http://www.cnblogs.com/zox2011/archive/2013/05/28/3103824.html
Linux_服务器_03_xxx is not in the sudoers file.This incident will be reported.解决方法
1.切换到root用户下,怎么切换就不用说了吧,不会的自己百度去. 2.添加sudo文件的写权限,命令是: chmod u+w /etc/sudoers
Linux遇到问题(一)Ubuntu报“xxx is not in the sudoers file.This incident will be report
提示错误信息 www@iZ236j3sofdZ:~$ ifconfigCommand 'ifconfig' is available in '/sbin/ifconfig'T
Ubuntu技巧之"xxx is not in the sudoers file"解决方法
原文地址:http://www.linuxidc.com/Linux/2010-12/30386.htm 用sudo时提示"xxx is not in the sudoe
[RedHat]“is not in the sudoers file”解决方法
当在终端执行sudo命令时,系统提示“luckchengis not in the sudoers file”: $ sudo ls Password
ubuntu系统中有关sudoers文件访问错误解决方法
此文档详细介绍在ubuntu系统下由于某种操作(修改了/usr/目录下某些文件的权限,修改了用户的名字等)导致sudoers文件不可用时的解决方法。非常有用。
ZIP
0B
2019-02-18 16:41
Linux中“is not in the sudoers file”解决方法
最近虚拟机装了个RedHat Enterprise Server 5,用惯了Ubuntu,觉得不太适应。 当在终端执行sudo命令时,系统提示“cuser is not
树莓派sudoers文件
树莓派使用的sudoers文件,当调用管理员权限出问题时,很有可能是该文件出现了问题,一个可行的方法就是使用另一个Linux系统替换该文件。
其他
669B
2021-02-22 05:35
如何解决在Linux中使用sudo时出现'用户is not in the sudoers file. This incident will be reporte
这个问题表明您尝试使用sudo执行命令,但是系统认为您不在sudoers文件中,因此无法获得sudo权限。解决这个问题的一种方法是通过root用户登录,编辑/etc/sudoers文件,将您的用户添加
任意版本
Linux
2024-03-04 16:02