添加方法如下:

1.进入root模式
su - 
注意:su和-之间有空格
输入当前用户的密码

2.添加写权限
chmod u+w /etc/sudoers

3.将自己加入到sudoers中

gedit /etc/sudoers

注意此处使用的是gedit,如果你熟悉vi,vim也可以使用,不过对于我这个初学者来说gedit对于解决问题来说还是很方便的

进入之后,搜索 root
看到这样的一行:root ALL=(ALL)  ALL
在下面填上类似的信息,例如你的用户名字叫 user 则添加: user ALL=(ALL)   ALL
添加好后保存

4.撤销写权限
chmod u-w /etc/sudoers

OK,问题应该能解决

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

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

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

  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. Linux中添加管理员权限问题:xxx is not in the sudoers file. This incident will be reported.

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

  5. 解决linux下sudo更改文件权限报错xxxis not in the sudoers file. This incident will be reported.

    本文转自Linux社区作者为z-sm的文章 原文链接http://www.linuxidc.com/Linux/2016-07/133066.htm 之前一直使用的是ubuntu,后来安装了Cento ...

  6. 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 ...

  7. Linux ->> <user_name> not in the sudoers file. This incident will be reported.

    昨天在用sudo命令执行mkdir命令的时候发生了错误.错误提示如下: hadoop@master:/home$ sudo mkdir /home/hadoop [sudo] password for ...

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

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

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

    Linux中普通用户用sudo执行命令时报”xxx is not in the sudoers file.This incident will be reported”错误,解决方法就是在/etc/s ...

随机推荐

  1. 20170528xlVBA凑数一例

    Public Sub MakeUp() Dim Sht As Worksheet Set Sht = ThisWorkbook.Worksheets("设置") Dim Total ...

  2. 插件Vue.Draggable(5000🌟)

    安装资源库:从Vue资源:https://github.com/vuejs/awesome-vue下载 Libraries/UI Components/Form/Drag and Drop yarn ...

  3. LTE时代的定位技术:OTDOA,LPP,SUPL2.0

    LTE时代的定位技术:OTDOA,LPP,SUPL2.0 移动定位技术的发展历程 如今智能手机已经在整个社会普及,数量众多的手机应用成为了人们生活当中不可或缺的一部分.越来越多的手机应用都用到了手机定 ...

  4. hdu 2018多校8

    A.Character Encoding 简单计数 m个非负数和等于k的方案数为$\binom{m+k-1}{k}$, 但题目还要求每个数小于n, 容斥一下即可 即$ans = \sum\limits ...

  5. 从客户端(......)中检测到有潜在危险的 Request.Form 值

    在提交表单时候,asp.net 提示:"从客户端(......)中检测到有潜在危险的 Request.Form 值" .asp.net中的请求验证特性提供了某一等级的保护措施防止X ...

  6. JavaScript 对象的使用

    JavaScript支持面向对象的编程方法. 2.9.1 window对象(窗口对象)的常用方法 内部函数 alert ( ) ,实际上是 window 对象的方法,写成全称为 window . al ...

  7. TABLE中动态设置poplist的值跟着当前行的某些列动态变化

    核心方法 OAAdvancedTableBean table = (OAAdvancedTableBean)webBean.findChildRecursive("TimeEntryTbl& ...

  8. snagit12个人爱好

  9. ajax 函数的相关介绍

    函数serialize serialize() 是jquery对象的一个方法,其作用是将对象的包含的值序列化为一个字符串,常用在get请求中. exp: $('#formname').serializ ...

  10. CAS-认证流程

    从结构上看cas包括两个部分,CAS server 和CAS client 需要独立部署,主要负责用户的认证工作,CAS负责处理对客户端受保护资源的访问请求,需要登录时,重新定向到CAS Server ...