提示"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. url 中文及特殊字符转码

    #include <ctype.h> std::string UrlEncode(const std::string& szToEncode) {    std::string s ...

  2. CSSposition属性

    基本html文本 1.  position-static #part1{ width:  200px; height:  200px; background:  gold; } #part2{ pos ...

  3. 让AI简单且强大:深度学习引擎OneFlow技术实践

    本文内容节选自由msup主办的第七届TOP100summit,北京一流科技有限公司首席科学家袁进辉(老师木)分享的<让AI简单且强大:深度学习引擎OneFlow背后的技术实践>实录. 北京 ...

  4. 脚本:截取euroc数据集bag文件的其中一段

    脚本:截取euroc数据集bag文件的其中一段 功能:截取euroc数据集bag中的一段供算法测试 python脚本 #!/usr/bin/env python # ----------------- ...

  5. python连接服务器上传文件,后台执行命令

    上传文件 import os import paramikoimport logging from django.core.cache import cache from YunTai import ...

  6. Python 学习笔记6 变量-元组

    我们在上一篇中了解了变量list(列表), 今天我们来介绍下元组.元组是由括号和逗号,组织起来的一个元素的集合.和list不同的是,它其中的元素是不能被修改的,和其他语言中的常量相类似. 需要注意的是 ...

  7. CQL语句

    CQL中默认忽略大小写,若需要大小写敏感,可使用双引号将对象包起来,引用的时候也要用双引号包住 tips: 使用CQL需要预装Python环境 Ⅰ.基本知识点 1.1 数据类型 这边和关系型数据库相近 ...

  8. Python+Selenium+PageObject

    一.安装page_objects测试库 二.目录介绍 1.pages包:用于各界面元素定位,如BaseLoginPage.py 2.testcases包:用于编写各功能测试用例,如Login.py 3 ...

  9. HSRP(Hot Standby Router Protocol)

    一.简介       HSRP(Hot Standby Router Protocol 热备份路由器协议)是Cisco的专有协议.HSRP把多台路由器组成一个“热备份组”,形成一个虚拟路由器.这个组内 ...

  10. python练习题-day25

    class Person: __key=123 def __init__(self,username,password): self.username=username self.__password ...