假设你用的是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. DotNetCore跨平台~EFCore2.0连接Mysql的烦恼-已解决

    回到目录 对于传统的nuget包,我们习惯上用官方或者大型组织的,因为它们比较考靠谱,但就在前两天.net core2.0发布后,我把efcore也升级到2.0了,mysql.EfCore也升级到支持 ...

  2. [翻译] GCC 内联汇编 HOWTO

    目录 GCC 内联汇编 HOWTO 原文链接与说明 1. 简介 1.1 版权许可 1.2 反馈校正 1.3 致谢 2. 概览 3. GCC 汇编语法 4. 基本内联 5. 扩展汇编 5.1 汇编程序模 ...

  3. View的绘制流程

    这是年假最后一篇笔记了,本篇文章的内容主要来自<android开发艺术探索>,在文章的最后有这本书的网上版本. 项目源码 目录 MeasureSpec SpecMode分类 UNSPECI ...

  4. 【转载】java static 关键字的四种用法

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

  5. Spring Cloud Alibaba基础教程:Sentinel使用Apollo存储规则

    上一篇我们介绍了如何通过Nacos的配置功能来存储限流规则.Apollo是国内用户非常多的配置中心,所以,今天我们继续说说Spring Cloud Alibaba Sentinel中如何将流控规则存储 ...

  6. Linux系统上安装MySQL(rpm)

    1.准备工作 从MySQL官网上分别下载mysql服务器端于客户端包. 如: MySQL-server-5.5.15-1.linux2.6.x86_64.rpm和MySQL-client-5.5.15 ...

  7. Django学习之八:forms组件【对form舒心了】

    目录 Django forms组件 bound and unbound form instance forms渲染有关 隐藏一个字段,不渲染它 form 校验 form类 ModelForm 利用Mo ...

  8. 程序员50题(JS版本)(七)

    程序31:有一个已经排好序的数组.现输入一个数,要求按原来的规律将它插入数组中 var test=[213,134,134,84,62,11]; const num=33; test.push(num ...

  9. Django 项目中添加静态文件夹

    在 mysite 文件夹下添加一个 statics 文件夹用来存放 js 文件 在 index.html 文件中添加 <!DOCTYPE html> <html lang=" ...

  10. java 线程池 ---- newFixedThreadPool()

    class MyThread implements Runnable{ private int index; public MyThread(int index){ this.index = inde ...