假设你用的是Red Hat系列(包括Fedora和CentOS)的Linux系统。当你执行sudo命令时可能会提示“某某用户 is not in the sudoers file.  This incident will be reported.”

解决方法:编辑sudoers文件有两种办法,一种是以root帐号执行visudo,另一种是root帐号执行vi /etc/sudoers.其实两者都是修改/etc/sudoers。

假设你的用户名是“92wiki”,属于“zhuxun”用户组。

为了让用户92wiki能够执行sudo命,你可以在sudoers文件中加上一下四行的任意一行。

zhuxun            ALL=(ALL)                ALL

%zhuxun            ALL=(ALL)                ALL

zhuxun               ALL=(ALL)                 NOPASSWD:ALL(出于方便,推荐使用此设置)

%zhuxun            ALL=(ALL)                NOPASSWD:ALL

解释说明:
第一行:允许用户zhuxun执行sudo命令(需要输入密码)。

第二行:允许用户组zhuxun里面的用户执行sudo命令(需要输入密码)。

第三行:允许用户zhuxun执行sudo命令,并且在执行的时候不输入密码。

第四行:允许用户组zhuxun里面的用户执行sudo命令,并且在执行的时候不输入密码。

当然如果你理解上面的原理后,可以直接输入如下命令解决此问题

su -
echo 'xxx ALL=(ALL) ALL' >> /etc/sudoers  (其中xxx代表用户名)
---------------------

原文:https://blog.csdn.net/zhu_xun/article/details/21087157

XXXX is not in the sudoers file. This incident will be reported解决方法的更多相关文章

  1. Linux 'XXXXXX' "is not in the sudoers file. This incident will be reported" 解决方法

    添加方法如下: 1.进入root模式su -  注意:su和-之间有空格输入当前用户的密码 2.添加写权限chmod u+w /etc/sudoers 3.将自己加入到sudoers中 gedit / ...

  2. Linux中新建用户用不了sudo命令问题:rootr is not in the sudoers file.This incident will be reported解决

    参考:https://blog.csdn.net/lichangzai/article/details/39501025 如果执行sudo命令的用户没有执行sudo的权限,执行sudo命令时会报下面的 ...

  3. 企业运维案例:xxx is not in the sudoers file.This incident will be reported” 错误解决方法

    CentOS6系统下,普通用户使用sudo执行命令时报错: xxx is not in the sudoers file.This incident will be reported" 解决 ...

  4. centos添加和删除用户及 xxx is not in the sudoers file.This incident will be reported.的解决方法

    修改主机名:vim /etc/sysconfig/network 1.添加用户,首先用adduser命令添加一个普通用户,命令如下: #adduser tommy //添加一个名为tommy的用户 # ...

  5. XXX 用户 is not in the sudoers file. This incident will be reported 的问题解决方案

    说的是,这种问题,是出现在ubuntu系统里. root@SparkSingleNode:/usr/local/jdk# pwd /usr/local/jdk root@SparkSingleNode ...

  6. Linux中添加管理员权限问题:xxx is not in the sudoers file. This incident will be reported.

    在各个不同版本的linux中添加拥有管理员权限账户有不同的简便方式. 问题: 今天遇见将新添用户添加到root用户组后,运行sudo仍然提示 ”xxx is not in the sudoers fi ...

  7. sunzl is not in the sudoers file.This incident will be reported

    Description: [sunzl@localhost nuc900bsp$] ./install.sh sorry!you are not the root !! [sunzl@localhos ...

  8. Linux遇到的问题(一)Ubuntu报“xxx is not in the sudoers file.This incident will be reported” 错误解决方法

    提示错误信息 www@iZ236j3sofdZ:~$ ifconfig Command 'ifconfig' is available in '/sbin/ifconfig' The command ...

  9. XXX is not in the sudoers file. This incident will be reported 的问题解决方案

    不多说,直接上干货! 说的是,这种问题,是出现在ubuntu系统里. root@SparkSingleNode:/usr/local/jdk# pwd /usr/local/jdk root@Spar ...

随机推荐

  1. LongLightUtils【保持屏幕常亮工具类】

    版权声明:本文为HaiyuKing原创文章,转载请注明出处! 前言 这里只是简单记录下保持屏幕常亮工具类LongLightUtils的使用,具体请阅读参考资料<Android屏幕常亮,其实很简单 ...

  2. org.apache.ibatis.builder.IncompleteElementException: Could not find result map java.lang.Integer

    如图: 详细错误信息如下: org.apache.ibatis.builder.IncompleteElementException: Could not find result map java.l ...

  3. python:socket网络编程

    Socket 网络上的两个程序通过一个双向的通信连接实现数据的交换,这个连接的一端称为一个socket, 又称为“套接字”. 模块 import socket 创建套接字 socket.socket( ...

  4. vue.js移动端配置flexible.js

    前言 最近在用vue做移动端项目,网上找了一些移动端适配的方案,个人觉得手淘团队flexible.js还是比较容易上手,在这里做下总结. 主体 flexible.js适配方案采用rem布局,根据屏幕分 ...

  5. 深度解密HTTP通信细节

    目录 HTTP报文截获 背景介绍 抓包 mac本地 远程docker 请求 && 分析 关闭服务进程 关闭docker 重启docker 正常请求 HTTP协议分析 整体介绍 编码 M ...

  6. 【转载】java final 关键字的几种用法

    原文链接点这里,感谢博主分享 在java的关键字中,static和final是两个我们必须掌握的关键字.不同于其他关键字,他们都有多种用法,而且在一定环境下使用,可以提高程序的运行性能,优化程序的结构 ...

  7. Nginx反向代理和Node.js后端解决跨域问题

    最近在写自己的博客,涉及到跨域的问题,自己捣鼓许久,终于解决了.然后总结一下,记录一下,日后遇到类似的问题的时候也可以得到一些启发. 一.什么是跨域 跨域,指的是浏览器不能执行其他网站的脚本.它是由浏 ...

  8. Rekit

    本文转自:http://rekit.js.org/docs/get-started.html Get started The easiest way to try out Rekit is creat ...

  9. json格式处理及扩展

    <script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.js"></script> < ...

  10. .NET Framework VS .NET Core

    本文对应的原文来至 c-sharpcorner 的一篇文章,文末有链接.如有错误,还请指正. 前言 你会为你的下一个应用程序选择哪一种开发平台 - .NET Framework 或者 .NET Cor ...