提示"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 颜色表示法

    css颜色值主要有三种表示方法: (1)颜色名表示,如:red红色,gold金色 (2)rgb表示,如:rgb(255,0,0)表示红色 (3)16进制数值表示,如:#ff0000表示红色,这种可以简 ...

  2. webpack 安装 打包

    一, 下载node.js  https://nodejs.org/zh-cn/ 二, //全局安装 npm install -g webpack //npm init 刷新webpack.json 文 ...

  3. git删除掉已经保存的用户名密码

    以保存的用户名密码删除,先找到变量存在的位置: git config -l To help track down the setting, I'd try to use: git config --l ...

  4. Java课程寒假之《人月神话》有感之三

    一.未雨绸缪 作者开始谈论实验室代码如何向开发出来的产品转变,化学工程师通过“实验性工厂”的中间步骤做测试来得到经验.而软件系统的构建人员却是按照时间进度将第一次开发的产品发布给顾客.对于我这只没有实 ...

  5. 19.3.25 sql查询语句

    1.单表查询:select * from 表名 where id = 111 2.查询表内数据并以id排序:select * from 表名 order by id (降序:desc/升序:asc) ...

  6. 移动端无法复制:使用clipboard.js碰到的一个小问题

    移动端无法复制:使用clipboard.js碰到的一个小问题   直接看下面的代码:在移动端访问,点击,能正常复制. <html> <head> <meta http-e ...

  7. Jmeter响应数据中文乱码

    在用Jmeter测试的时候吸纳供应数据如果出现中文乱码解决方法: 1.如下图在Content encoding输入框内输入  UTF-8

  8. pe文件头详解

  9. 底层原理Hashmap源码解析实例

    Map.java package com.collection; public interface Map<K, V> { public V put(K k, V v); public V ...

  10. input 在 2 和 3 上的区别

    2  和 3 上面 在 input 的区别 1 2 3 name = raw_input('请输入用户名:')#python2.7的用法 name = input('请输入用户名:')#python3 ...