普通用户用sudo执行命令时报"xxx is not in the sudoers file.This incident will be reported"错误,解决方法就是在/etc/sudoers文件里给该用户添加权限

1.切换到root用户下,修改/etc/sudoers权限

3.编辑sudoers文件
vi /etc/sudoers
找到这行 root ALL=(ALL) ALL,在他下面添加xxx ALL=(ALL) ALL (这里的xxx是你的用户名)

ps:这里说下你可以sudoers添加下面四行中任意一条
xxx            ALL=(ALL)                ALL
%xxx          ALL=(ALL)                ALL
xxx            ALL=(ALL)                NOPASSWD: ALL
%xxx         ALL=(ALL)                NOPASSWD: ALL

第一行:允许用户youuser执行sudo命令(需要输入密码).
第二行:允许用户组youuser里面的用户执行sudo命令(需要输入密码).
第三行:允许用户youuser执行sudo命令,并且在执行的时候不输入密码.
第四行:允许用户组youuser里面的用户执行sudo命令,并且在执行的时候不输入密码.

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

xxx is not in the sudoers file.This incident will be reported错误相关推荐

  1. 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"错误,解决 ...

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

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

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

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

  5. 【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 ...

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

    问题描述: 新建用户执行命令sudo chmod 700 ,提示输入root命令. 输入三次错误. 提示 yourid is not in the sudoers file. This inciden ...

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

  8. 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是你的用户 ...

  9. 【转载】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. python收集网页中的翻页
  2. generator自动生成mybatis的xml配置
  3. oracle s7-2,Oracle S7-2服务器硬盘7302552 7094132原装7093015 7093037 7317908
  4. nginx访问目录是没加/的重定向控制
  5. homelede软路由设置方法_斐讯无线路由器怎么设置 斐讯无线路由器设置方法【详解】...
  6. 数据结构基础(16) --树与二叉树
  7. 小红书:笔试题(棋盘最短路径,笔记本草稿栈,迷宫游戏)
  8. 人工智能的未来:杀戮还是治愈?
  9. windows和wsl设置代理
  10. 高性能计算机储存部件硬盘,高性能计算机的磁盘系统结构.pdf
  11. 《Cocos2d-JS开发之旅》重印在即,感谢大家的支持
  12. java font 字体 隶书_font-style字体设置
  13. 利安德巴赛尔任命Peter Vanacker任首席执行官;纬湃科技斩获长城汽车逆变器大额订单 | 能动...
  14. 服务器esn和文件esn不匹配,如何获取服务器ESN
  15. json数组的遍历(获取属性名和属性值)
  16. 动态规划算法解题思路
  17. 基于Insightface的人脸识别
  18. 2019最新百度、头条、小米、360、网易、等公司 Android 社招面试题目
  19. Spring核心思想,IoC与DI详解(如果还不明白,放弃java吧)
  20. 智慧医院解决方案(智慧医疗)

热门文章

  1. 基姆拉尔森计算公式求星期
  2. 什么是DDoS攻击?企业服务器是否需要DDoS防御
  3. 电脑屏幕监控,员工行为监控,上网行为监控解决方案
  4. cvs100e_CVS100E断路器|施耐德CVS100E塑壳断路器
  5. STM32学习记录——烟雾传感器的使用
  6. 小学起码常识凸显发散级数1-1+1-1+...=0 ——配对图让几百年都无人能识的N最大元一下子浮出水面
  7. C++程序设计 (自考课程代码4737)课后编程题答案
  8. 中国网上银行系统安全性分析
  9. 前端小白--marquee无缝滚动
  10. html实现表格的跨行、跨列