假设你用的是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. Redis 概念以及底层数据结构

    Redis 简介 REmote DIctionary Server(Redis) 是一个由SalvatoreSanfilippo写的key-value存储系统. Redis是一个开源的使用ANSI C ...

  2. Dapper的基本 理论 知识

    简述 Dapper是一个轻量级的ORM工具:ORM框架的核心思想是对象关系映射,ORM是将表与表之间的操作,映射成对象和对象之间的操作,就是通过操作实体类来达到操作表的目的.从数据库提取的数据会自动按 ...

  3. C#的Lock

    有时候在编写线程并发的时候需要考虑异步和同步的问题.有些资源只能是一个线程访问,其他的线程在这个线程没有释放资源前不能访问.类似于操作系统中临界资源的访问.C#Lock包裹的代码块具有原子操作的特性( ...

  4. 并发concurrent---1

    背景:并发知识是一个程序员段位升级的体现,同样也是进入BAT的必经之路,有必要把并发知识重新梳理一遍. 并发concurrent: 说到并发concurrent,肯定首先想到了线程,创建线程有两种方法 ...

  5. windows系统 docker + swoole 操作

    之前文章讲过在windows系统安装 cgywin 从而安装swoole扩展的操作,但是安装cgywin的时候会出现这样那样的问题.所以今天记录下另一种方式使用docker 安装 swoole 环境! ...

  6. Django学习之十: staticfile 静态文件

    目录 Django学习之十: staticfile 静态文件 理解阐述 静态文件 Django对静态文件的处理 其它方面 总结 Django学习之十: staticfile 静态文件 理解阐述     ...

  7. DataTable克隆行

    DataRow Adr = ds.Tables[].NewRow(); Adr.ItemArray = (].Rows[].ItemArray.Clone(); ds.Tables[].Rows.Ad ...

  8. flex页面布局练习--知乎

    采用flexbox弹性容器 在手机端进行页面布局 样本地址: http://tpl.zhuamimi.cn/%E6%89%8B%E6%9C%BA%E7%AB%AF%E9%A1%B5%E9%9D%A2- ...

  9. 关于Android中ION的libion

    在高通的OpenCL SDK中,其Android.mk文件中,有判断当前kernel的版本,如果大于4.12,那么就使用libion.so,否则则使用ion kernle uapi: # Tries ...

  10. Chart.js 與 ASP.NET MVC 整合應用

    Chart.js 是一套開放原始碼的「圖表」繪製函式庫,和其他第三方的圖表工具相比,Chart.js 的特色如下: 支援 HTML 5.響應式網頁 (RWD, Responsive Web Desig ...