假设你用的是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. Linux - 通过SecureCRT的rz、sz和sftp实现文件的上传和下载

    目录 1 通过rz/sz命令上传/下载 1.1 安装lrzsz软件 1.2 rz - 上传文件 1.3 sz - 下载文件 2 通过sftp上传/下载文件 2.1 关于SFTP的简介 2.2 SFTP ...

  2. 五行Python代码教你用微信来控制电脑摄像头

    如果说强大的标准库奠定了Python发展的基石,丰富的第三方库则是python不断发展的保证.今天就来通过itchart库来实现通过微信对电脑的一些操作. 一.安装库 安装itchat itchat ...

  3. jenkins定位GitLab推送的最新Webhook中push event来自哪一个分支

    转载请标明出处:http://www.cnblogs.com/zblade/ 一.调研目的 jenkins可以和GitLab搭档,每当GitLab上有commit的时候,都可以触发jenkins执行相 ...

  4. [Linux] 一个前端必会的 Nginx 免费教程-在虚拟机中用deepin测试

    原文技术胖的 nginx 技术胖 专注于前端开发 deepin Linux Deepin 是一个基于 DEB 包管理的一个独立操作系统,和那些 Ubuntu(下个大版本是基于 debian 开发) 的 ...

  5. python 题库1

    1. 生成一个1到50的大字符串,每个数字之间有个空格,例如1 2 3 4 ……50 解题思路: (1)声明一个空字符串变量用于保存生成的字符串 (2)使用for循环+range()函数生成一个1到5 ...

  6. The openssl extension is required for SSL/TLS protection but is not available

    今天使用composer update发现报错:The openssl extension is required for SSL/TLS protection but is not availabl ...

  7. java爬虫系列第二讲-爬取最新动作电影《海王》迅雷下载地址

    1. 目标 使用webmagic爬取动作电影列表信息 爬取电影<海王>详细信息[电影名称.电影迅雷下载地址列表] 2. 爬取最新动作片列表 获取电影列表页面数据来源地址 访问http:// ...

  8. js字符串转json格式与json对象转字符串

    json字符串----->json对象json对象------>json字符串 使用JSON.parse()函数 this.dataList = JSON.parse(dataList); ...

  9. Vue 单选框与单选框组 组件

    radio组件 v-model  : 通过当然绑定的值与input上的value值来确定当前选中项. 在父作用域中通过active设置当前默认选中项,如果选中项发生改变后通过input事件通知传递到父 ...

  10. 解决将Excel表导入到SQL Server数据库时出现Text was truncated or one or more characters had no match in the target code错误

    编写python爬虫程序可以在电商.旅游等网站上爬取相关评论数据,这些数据可以用于词云制作.感情词分析.提取关键词等,也可以将爬取下来的数据以自己的方式进行展示.评论数据爬取下来后,就要考虑怎样入库, ...