提示"xxx is not in the sudoers file. This incident will be reported.其中 ”XXX“是你的用户名,也就是你的用户名没有权限使用sudo,我们只要修改一下/etc/sudoers文件就行了。
下面是修改方法:
1)进入超级用户模式。打开'Open Terminal' 输入"su",系统会让你输入超级用户密码,输入密码后就进入了超级用户模式。(当然,你也可以直接用root权限) 
2)添加文件的写权限。"[root@localhost admin]"下,输入命令"chmod u+w /etc/sudoers"。 
3)编辑sudoers文件。输入命令"vim /etc/sudoers",输入"a"进入编辑模式,找到这一 行:"Allow root to ruan any commands anywhere"在【root ALL=(ALL) ALL】下面一行添加"xxx ALL=(ALL) ALL"(这里的xxx是你的用户名),然后保存(就是先按一 下Esc键,然后输入":wq")退出。 
4)撤销sudoers文件的编写权限。输入命令"chmod u-w /etc/sudoers"
5)"XXX"用户获得了权限。

CentOS7──xxx is not in the sudoers file的更多相关文章

  1. centos添加和删除用户及 xxx is not in the sudoers file.This incident will be reported.的解决方法

    修改主机名:vim /etc/sysconfig/network 1.添加用户,首先用adduser命令添加一个普通用户,命令如下: #adduser tommy //添加一个名为tommy的用户 # ...

  2. Error prompt:“xxx is not in the sudoers file”----Solution

    //Situation    System prompts "xxx is not in the sudoers file"(xxx equals the user name) w ...

  3. Linux中添加管理员权限问题:xxx is not in the sudoers file. This incident will be reported.

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

  4. ubuntu:xxx is not in the sudoers file. 问题解决

    ubuntu 下普通用户用 sudo 执行命令时报 "xxx is not in the sudoers file.This incident will be reported" ...

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

  6. Linux sudo 错误:XXX is not in the sudoers file 解决办法

    最近在学习linux,在某个用户(xxx)下使用sudo的时候,提示以下错误:xxx is not in the sudoers file. This incident will be reporte ...

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

  8. sudo 提示 'xxx is not in the sudoers file.This incident will be reported.的解决方法'

    在使用 Linux 的过程中,有时候需要临时获取 root 权限来执行命令时,一般通过在命令前添加 sudo 来解决. 但是第一次使用 sudo 时,有可能会得到这样一个错误提示 xxx is not ...

  9. 企业运维案例: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" 解决 ...

随机推荐

  1. 运用了css,js

    代码如下: <!DOCTYPE html><html xmlns="http://www.w3.org/1999/html"><head> &l ...

  2. php正则表达式 剔除字符串中 ,除了汉字的字符(只保留汉字) php 正则 只保留汉字,剔除所有符号

    <?php //提取字符串中的汉字其余信息剔除 $str='f龙,真 .,.,.?!::·…~&@#,.?!:;.……-&@#“”‘’〝 "〞'´'>< ...

  3. python语法_字符串

    字符串 a = 'asdb' #双引号和打印号没区别, 操作 "abc"*2 打印两遍"abc"  #字符串 加* 重复打印字符串 “abc”[2:1] #切片 ...

  4. 触发器中的after与before理解

    做一个表的insert的trigger,目的是只修改插入行的字段. CREATE OR REPLACE TRIGGER TR_RME_SLOT BEFORE INSERT ON RME_SLOT FO ...

  5. VS2017 未找到编译器可执行文件 csc.exe

    vs2017 网站报错 原因Web.config是中下面这段:注释就可以了 <!--<system.codedom> <compilers> <compiler l ...

  6. 数学和物理太难?这些 GIF 让你秒懂抽象概念

    把科学带回家,给孩子最好的科学教育 觉得数学和物理很抽象很难懂吗?今天我们来分享一组数学和物理相关的动图,让你秒懂抽象概念. 数学动图 △ 从椭圆的一个焦点射出的光线总会通过另一个焦点. △ 真人版. ...

  7. iOS开发支付篇-内购(IAP)

    一,前言 经典文章参考: . http://yimouleng.com/2015/12/17/ios-AppStore/ 内购流程 . http://www.jianshu.com/p/b199a46 ...

  8. Centos-7.4_安装_Redis_4.0.8

    一.安装redis 第一步:下载redis安装包 [root@Redis ~]# mkdir /usr/local/redis/ --创建目录 [root@Redis redis]# cd /usr/ ...

  9. springboot新增swagger2配置

    转自http://www.cnblogs.com/jtlgb/p/8532433.html SpringBoot整合Swagger2 相信各位在公司写API文档数量应该不少,当然如果你还处在自己一个人 ...

  10. python学习笔记4-切片

    # 以list为例子,对tuple的切片类似 L = ['a','b','c','d','e'] L[1:3] # ['b', 'c'] # 1.起始.末尾切片可省略 L[:3] # ['a', 'b ...