2019独角兽企业重金招聘Python工程师标准>>>

场景:
    在CentOS中创建了一个新用户user,在调用sudo命令时,报:“user is not in the sudoers file. This incident will be reported” 错误,无法执行sudo命令。

分析:
    在ubuntu中由于禁用了root用户,默认情况下会把安装系统时建立的用户添加到sudoers中。但在redhat和centos中并没有把任何root用户之外的用户默认的添加到sudoers之中。这样我们在执行sudo 命令时就会出现xxx is not in the sudoers file. This incident will be reported.这样的错误输出。现在为了安全起见比较提倡使用普通用户做日常操作,而在需要超级用户的时候使用sudo 来做,这样,我们就有必要把一些用户添加到sudoers之中。

解决:

#chmod u+w /etc/sudoers
#vi /etc/sudoers在root ALL=(ALL)ALL行下添加XXX ALL=(ALL)ALL,XXX为你的用户名#chmod u-w /etc/sudoers

转载于:https://my.oschina.net/u/699015/blog/262364

user is not in the sudoers file.相关推荐

  1. Linux中新建用户用不了sudo命令问题:rootr is not in the sudoers file.This incident will be reported解决

    Linux中新建用户用不了sudo命令问题:rootr is not in the sudoers file.This incident will be reported解决 参考:https://b ...

  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. linux sudo命令错误 is not in the sudoers file

    当在终端执行sudo命令时,系统提示"hadoop is not in the sudoers file": 其实就是没有权限进行sudo,解决方法如下(这里假设用户名是cuser ...

  4. xx is not in the sudoers file 问题解决

    原文:http://blog.sina.com.cn/s/blog_4ef045ab0100j59t.html 我用的是redhat5.4,在一般用户下执行sudo命令提示llhtiger is no ...

  5. not in the sudoers file. This incident will be reported.

    sudo vi /etc/sudoers 你的用户名 ALL=(ALL:ALL) ALL 如下 # # This file MUST be edited with the 'visudo' comma ...

  6. How to Fix “Username is not in the sudoers file. This incident will be reported” in Ubuntu

    How to Fix "Username is not in the sudoers file. This incident will be reported" in Ubuntu ...

  7. [已解决]user is not in the sudoers file. This incident will be reported.(简单不容易出错的方式)

    linux Ubuntu中报错,XXX is not in the sudoers file. This incident will be reported. 今天在学习的时候,不小心把自己的用户su ...

  8. 【Linux】XXX is not in the sudoers file …… 的解决方案

    XXX is not in the sudoers file -- 网上资料都告诉大家,解决方法是改root ALL=(ALL) ALL那里,可能有的新手看不懂,这里解释一下. 在终端执行sudo命令 ...

  9. Centos普通用户权限报错:** is not in the sudoers file. This incident will be reported.

    在centos下有一个普通用户hadoop,在用hadoop创建文件夹: [hadoop@localhost /] sudo mkdir /soft [sudo] password for hadoo ...

最新文章

  1. jar docker镜像不能启线程_使用docker部署SpringCloud项目
  2. win10系统80端口被System (PID=4)占用的解决
  3. python中requests库的用途-数据爬虫(三):python中requests库使用方法详解
  4. Tool:微信使用技巧之手把手教你如何在电脑端同时登录多个微信账号之图文教程详细攻略
  5. oracle自动选择索引
  6. html判断坐标,js判断鼠标位置是否在某个div中的方法
  7. C++Socket编程总结
  8. spring boot(一):Hello World
  9. E/MediaPlayer: Should have subtitle controller already set
  10. 你自认为理解了JavaScript?
  11. CodeSnippet.info 开源说明 和 环境搭建 (第一版)
  12. 《Linux命令行与shell脚本编程大全》 第二十二章 学习笔记
  13. 如何提高go代码覆盖率_我是如何把5万行C++代码移植到Go的?
  14. 《计算机网络 自顶向下》第八章==网络安全
  15. 第八章:加载Maya2011模型
  16. wamp 增加php 7.2,wamp环境下php7.2升级,WAMP本地环境升级php7+版本
  17. CC++:计算某年某月的1号是星期几
  18. 《让荧光舞一直挥舞下去》
  19. 字符串正则替换、点替换横杠
  20. 为您的创业公司推荐5款类Slack开源协作工具

热门文章

  1. 数据缺失、混乱、重复怎么办?最全数据清洗指南!
  2. Datawhale 内推 | 头条、百度、网易、滴滴、联想、商汤、平安科技等
  3. 【Markdown】如何在微信公众号上写markdown的文章
  4. AI 是否拥有意识?从意识的定义说起
  5. 【计算机视觉征稿】EI会议推荐|计算机多主题征稿,往届已被EI检索,ICCVDM 2021诚邀您投稿参会!...
  6. 两位院士同时受聘,山东大学再添强援
  7. 百度一口气亮出NLP十年积累:完整技术布局全面披露,面向业界砸下11项七夕大礼...
  8. PyTorch 版 EfficientDet 比官方 TF 实现快 25 倍?这个 GitHub 项目数天狂揽千星
  9. 中科院智能乒乓球桌登上Nature:检测球速跟踪路径,准确找到击球位置
  10. 27 个问题,告诉你 Python 为什么如此设计?