1.问题
xxx is not in the sudoers file.This incident will be reported.

2.分析
该问题的根本原因是由于Linux的超级用户权限是由sudo动态赋予的,在新增的用户不会默认赋予sudo权力,因此若需要该用户有sudo的权限,需要根据一定的规则进行赋予。

3.解决方法
以下两种方法都是基于现有的用户能够获取root权限进行,不管是root用户本身还是用户A(用户A能够使用sudo)

3.1 手动修改
1.赋予sudoer文件写权限

sudo chmod u+w /etc/sudoers

2.编辑sudoers文件,给对应的用户添加sudo权限

sudo vi /etc/sudoers

找到如下并参照书写,这里以给用户A添加sudo权限:

root    ALL=(ALL:ALL) ALL

添加

A    ALL=(ALL:ALL) ALL

3.撤销sudoers的写权限(否则异常)

sudo chmod u-w /etc/sudoers

Linux中出现 xxx is not in the sudoers file.This incident will be reported.相关推荐

  1. 【sudo错误】xxx is not in the sudoers file.This incident will be reported解决

    文章目录 1.问题 2.分析 3.解决方法 3.1 手动修改 3.2 命令方式修改--sudo visudo 4.扩展说明 1.问题 xxx is not in the sudoers file.Th ...

  2. Ubuntu报“xxx is not in the sudoers file.This incident will be reported” 错误解决方法

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

  3. 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. 解决 ...

  4. xxx is not in the sudoers file.This incident will be reported错误

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

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

    xxx is not in the sudoers file.This incident will be reported.的解决方法 参考文章: (1)xxx is not in the sudoe ...

  6. xxx is not in the sudoers file. This incident will be reported.

    sudo,用其他用户的身份执行命令. 运行该命令时,系统首先检查/etc/sudoers,判断该用户是否有执行sudo的权限,在确定有执行权限后,要求输入自己的密码(当前用户),如果密码正确,会以ro ...

  7. centos/Linux 解决使用sudo命令时xxx is not in the sudoers file.This incident will be reported

    解决方法 切换到root用户: su 然后在root用户下输入命令: chmod u+w /etc/sudoers vim /etc/sudoers 在vim编辑器界面输入/root查询到这一行: r ...

  8. CentOS下添加Root权限用户‘超级用户’方法(xxx is not in the sudoers file.This incident will be reported.的解决方法)

    文章目录 1.添加普通用户 2.添加sudo文件的写权限 3.编辑sudoers文件 4.撤销sudoers文件写权限 1.添加普通用户 [root@server ~]# useradd fxd // ...

  9. xxx is not in the sudoers file.This incident will be reported.

    1.切换到root用户,运行visudo命令 visudo 2.打开的配置文件,找到这行 root ALL=(ALL) ALL,在他下面添加xxx ALL=(ALL) ALL (这里的xxx是你的用户 ...

  10. 【转载】xxx is not in the sudoers file.This incident will be reported.的解决方法

    1.切换到root用户下,怎么切换就不用说了吧,不会的自己百度去. 2.添加sudo文件的写权限,命令是: chmod u+w /etc/sudoers 3.编辑sudoers文件 vi /etc/s ...

最新文章

  1. 爆肝800000秒想出低成本无人驾驶测距
  2. 斐波那契数列 || 猴子吃桃问题 用递归实现
  3. C中的危险函数(缓冲区溢出)
  4. PHP中的Trait方法
  5. java高级----Thread之CyclicBarrier的使用
  6. java推送数据给安卓,java – 如何从Firebase推送通知中获取数据并将其显示在Android Activity中?...
  7. 可视化webpart基础开发——TreeView控件读取文档库中的所有文件夹和文件(递归方法读取) ....
  8. java 中文域名转码_转换java方法
  9. 工信部发布《区块链 数据格式规范》标准(PPT全文)
  10. 使用Express开发小说API接口服务1.0(二)
  11. 带你了解敏捷和DevOps的发布策略
  12. 设计模式笔记零:设计模式简介
  13. Windows 10修改环境变量方法
  14. amos调节变量怎么画_AMOS 中验证性因素分析(CFA)
  15. 互联网之“死”:为什么开发者会排斥新技术?
  16. ssh图示+hibernate图示
  17. 爬取网易云音乐某个歌手的全部歌曲的歌词
  18. 【bug记录】Vue项目执行报错处理:You may need an appropriate loader to handle this file type.
  19. BigGAN代码解读(gpt3.5帮助)——生成器部分
  20. ubuntu 安装依赖包时出现The following packages have unmet dependencies:

热门文章

  1. 饮茶而思其源,中国茶叶之起源
  2. Gossip 协议简介
  3. python2.x 获取网页内容
  4. 备份手机相册----syncthing (一劳永逸式解决方案)
  5. iOS 逻辑分辨率、物理分辨率
  6. 阿里云常用产品汇总及解释
  7. 机器学习项目中不可忽视的一个密辛 - 大数定理
  8. 【C/C++】为什么INT_MAX(整形最大值)减去INT_MIN(整形最小值)等于-1
  9. java找不到符号 类_得到错误java:找不到符号类
  10. DevOps学习笔记--Jerrit介绍