使用用户账户使用sudo来运行一些特权命令时出现了如下错误(sudo是一个允许特定的用户组用另一个用户(典型的是root)的特权来运行一个命令):
user is not in the sudoers file.  This incident will be reported.

意思是你不在这个包含经过认证就可以使用sudo特权的这么一个用户组的sudoers列表里。

在Sudoers列表里添加用户

第一步:在root用户下编辑sudoers配置文件。将与wheel组相关的配置信息前的注释符号“#”去掉。使所有属于wheel组的用户具有root用户的所有命令执行的权限。

[root@localhost ~]# visudo
-------------修改前---------------
#%wheel ALL=(ALL) ALL
# Same thing without a password
#%wheel ALL=(ALL) NOPASSWD: ALL
-----------修改后-----------------
%wheel ALL=(ALL) ALL
# Same thing without a password
%wheel ALL=(ALL) NOPASSWD: ALL

第二步:将oracle用户添加到wheel组中,在group文件中找到“wheel”关键字所在行记录。 在wheel记录后面添加“,oracle”,实现将oracle用户加入到wheel组中

[root@localhost ~]# vi /etc/group
wheel:x::root,oracle

第三步:测试 我们可以使用“id”命令简单测试一下sudo命令的可用性。在需要测试用户下使用id命令获得当前用户的信息

[oracle@secdb1 ~]$ id
uid=(oracle) gid=(oinstall) groups=(wheel),(dba),(oinstall)

注释:关于sudo的深入配置方法,可以使用 man sudo 自行查询

user is not in the sudoers file的更多相关文章

  1. oracle is not in the sudoers file. This incident will be reported.

    准备把OS的root禁用了,所以其他用户要执行使用root执行的操作时,需要使用sudo. 在没有配置sudo的时候,执行sudo会出现类似以下的报错: [oracle@test ~]$ sudo / ...

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

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

  3. is not in the sudoers file 问题解决【转载】

    解决方案:首需要切换到root身份$su - 或者 $sudo -s (注意有- ,这和su是不同的,在用命令"su"的时候只是切换到root,但没有把root的环境变量传过去,还 ...

  4. sudo 使用不了, the permissions on the /etc/sudoers file are changed to something other than 0440

    sudo 使用不了,报错: the permissions on the /etc/sudoers file are changed to something other than 0440 how ...

  5. 【linux】xx is not in the sudoers file 解决办法

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

  6. CentOS下解决”用户账户is not in the sudoers file“问题

    如上图,在当前用户cent(我的用户名)下使用sudo命令时,提示"cent is not in the sudoers file. This incident will be report ...

  7. Linux有问必答:怎样解决“XXX is not in the sudoers file”错误

    问题:我想在我的Linux系统上使用sudo来运行一些特权命令,然而当我试图这么做时,我却得到了"[我的用户名] is not in the sudoers file. This incid ...

  8. Linux下is not in the sudoers file解决方法

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

  9. XXX 用户 is not in the sudoers file. This incident will be reported 的问题解决方案

    说的是,这种问题,是出现在ubuntu系统里. root@SparkSingleNode:/usr/local/jdk# pwd /usr/local/jdk root@SparkSingleNode ...

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

随机推荐

  1. 0507 构造代码块和static案例,接口interface

    0507构造代码块和static案例,接口interface [重点] 1.局部变量,成员变量,静态变量的特点 2.接口 接口语法:interface A {} 接口内的成员变量[缺省属性]publi ...

  2. switch下返回各类的数值

    定义一个变量,在每个case下赋值,最后return public static int orderDishes(int choice) { int price = 0; switch (choice ...

  3. NO.6 ADS1115与MSP432进行I2C通信_运行实例

    B站第一次传视频,手机拍摄大家见谅!

  4. CF1353E K-periodic Garland(贪心/dp)

    Question 有n盏灯,0代表暗,1代表亮,相邻两个1之间为周期k,求出最少的改变次数 Solution First 贪心方法 详见博客https://blog.csdn.net/cheng__y ...

  5. [PHP插件教程]003.PhpRedis

    PhpRedis 介绍 Mac安装步骤 安装Redis 安装PhpRedis 示例代码 介绍 Redis是一个高性能的key-value数据库. Redis提供了Java,C/C++,C#,PHP,J ...

  6. 02 . Mysql基础操作及增删改查

    SQL简介 SQL(Structured Query Language 即结构化查询语言) SQL语言主要用于存取数据.查询数据.更新数据和管理关系数据库系统,SQL语言由IBM开发. SQL语句四大 ...

  7. Jmeter(五) - 从入门到精通 - 创建网络计划实战和创建高级Web测试计划(详解教程)

    1.简介 上一篇中宏哥已经将其的理论知识介绍了一下,这一篇宏哥就带着大家一步一步的把上一篇介绍的理论知识实践一下,然后再说一下如何创建高级web测试计划. 2.网络计划实战 通过上一篇的学习,宏哥将其 ...

  8. jchdl - GSL实例 - Add

    https://mp.weixin.qq.com/s/6xcYYdYZTBPTf25xFluzBQ   使用FullAdder级联实现加法器   参考链接: https://github.com/wj ...

  9. IDEA字节码学习查看神器jclasslib bytecode viewer介绍

    转载来自:https://blog.csdn.net/w605283073/article/details/103209221 一.背景 很多人想学习Java反汇编后的字节码,但是一方面缺乏好的资料, ...

  10. java实现 历届试题 蓝桥杯 打印十字图

    历届试题 打印十字图 题目描述 小明为某机构设计了一个十字型的徽标(并非红十字会啊),如下所示(可参见p1.jpg) 对方同时也需要在电脑dos窗口中以字符的形式输出该标志,并能任意控制层数. 为了能 ...