使用用户账户使用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. SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'xxx' already exists

    字面意思 xxx表已存在. 在使用laravel  写同步结构的时候 最好习惯性写个if语句判定是否存在 // 判断数据表是否存在 Schema::hasTable('table'); // 判断数据 ...

  2. [转]什么是OpenSSH

    定义 SSH是什么? 相关概念 OpenSSH安全吗?究竟安全在哪里呢? Telnet这么好的一个工具为什么还要用户手动开启呢? SSH账户类型 iPhone中修改密码的大致步骤 如何从电脑连接通过S ...

  3. word dde payload

    payload: ctrl+F9 {DDEAUTO c:\\windows\\system32\\cmd.exe "/k calc.exe" } Since this techni ...

  4. Python--numpy中的tile()函数

    首先是官方给的定以(我是用的VsCode,鼠标放置在tile上出现的),建议直接看后面的示例.   def tile(A, reps) Construct an array by repeating ...

  5. 【HIVE高级笔试必备题型】(组内topN、相邻行的值比较问题)求语文大于数学_/_求文科大于理科成绩的学生

    Hive SQL练习之成绩分析 数据:[id, 学号,班级,科目,成绩] 1,1,1,yuwen,80 2,1,1,shuxue,85 3,2,1,yuwen,75 4,2,1,shuxue,70 5 ...

  6. 【Redis面试题】如何使用Redis实现微信步数排行榜?

    1. 前言 之前写过一篇博客,讲解的是Redis的5种数据结构及其常用命令,当时有读者评论,说希望了解下这5种数据结构各自的使用场景,不过一直也没来得及写. 碰巧,在3月份找工作面试时,有个面试官先问 ...

  7. 自制基于python的DoU log分析脚本

    工作中测试DoU的log需要分析,原先是使用excel,去ctrl c,ctrl v截取数据,整理格式等等.一来,这工作虽然很简单,但是非常耗时,不熟练的人(比如我)一搞搞个半天:二来,不小心还会出现 ...

  8. java实现洛谷P1308统计单词数

    题目描述 一般的文本编辑器都有查找单词的功能,该功能可以快速定位特定单词在文章中的位置,有的还能统计出特定单词在文章中出现的次数. 现在,请你编程实现这一功能,具体要求是:给定一个单词,请你输出它在给 ...

  9. java实现字符串比较

    标题:字符串比较 我们需要一个新的字符串比较函数compare(s1, s2). 对这个函数要求是: 1. 它返回一个整数,表示比较的结果. 2. 结果为正值,则前一个串大,为负值,后一个串大,否则, ...

  10. java实现第三届蓝桥杯提取子串

    提取子串 [代码填空](满分16分) 串"abcba"以字母"c"为中心左右对称:串"abba" 是另一种模式的左右对称.这两种情况我们都称 ...