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

1.切换到root用户下

2./etc/sudoers文件默认是只读的,对root来说也是,因此需先添加sudoers文件的写权限,命令是:
chmod u+w /etc/sudoers

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

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

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

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

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

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

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

  3. 【转载】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 ...

  4. Zox's code life 人生就是不停的战斗! 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 ...

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

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

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

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

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

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

最新文章

  1. ROS知识(4)----初级教程之常见问题汇总
  2. L1-016 查验身份证(2016年天梯赛模拟赛第8题)
  3. Nature:原来益生菌是这么搞定致病菌的
  4. 每句话都可以品半辈子!!!
  5. Enum.GetHashCode()的问题
  6. TimeSpan 时间间隔
  7. Http协议中的数据传送之多重表单提交--multipart/form-data
  8. 源码包安装mysql5.7.25_centos源码安装mysql5.7.25-boost
  9. 数据挖掘引入:基础知识
  10. 华为畅享9S曝光:2400万超广角AI三摄+珍珠屏
  11. 调制:调幅(AM)与调频(FM)
  12. javascript的constructor属性介绍
  13. android 利用cmdline,将參数从preloader传递到kernel
  14. setTimeout 方法用于在指定的毫秒数后调用函数或计算表达式
  15. 夜神模拟器android 8.0,夜神模拟器6.0.8.0
  16. 什么是抓包?为什么要抓包?
  17. 常用邮箱大全,申请邮箱收费吗?邮箱活动有哪些?
  18. 计算机综合素质测试判断,综合素质测试在电脑上考的都是哪些内容啊
  19. linux设备模型十二(热拔插hotplug)
  20. 周志华-机器学习 (绪论、模型评估与选择)

热门文章

  1. linux 脚本取反,shell 取反实现
  2. 波士顿动力的机器狗上班了!挪威石油公司还发其工号
  3. 软银三亿重金押注的RPA到底是什么,它能取代人力吗?
  4. Kaggle 美女小姐姐自述:我是怎么成为竞赛中 Top 0.3% 的?
  5. 与AI人才有关的讨论
  6. 【知乎】中国是否适合发展纯电动汽车?
  7. python 文件函数_python文件操作及函数学习
  8. 最聪明的如何成为优秀的——微软高管指点成材路
  9. 博客网最终能否破茧成蝶?
  10. 苹果宣布将推出自助维修计划 网友:下一步准备卖“零件版”iPhone?