user is not in the sudoers file
使用用户账户使用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的更多相关文章
- oracle is not in the sudoers file. This incident will be reported.
准备把OS的root禁用了,所以其他用户要执行使用root执行的操作时,需要使用sudo. 在没有配置sudo的时候,执行sudo会出现类似以下的报错: [oracle@test ~]$ sudo / ...
- centos添加和删除用户及 xxx is not in the sudoers file.This incident will be reported.的解决方法
修改主机名:vim /etc/sysconfig/network 1.添加用户,首先用adduser命令添加一个普通用户,命令如下: #adduser tommy //添加一个名为tommy的用户 # ...
- is not in the sudoers file 问题解决【转载】
解决方案:首需要切换到root身份$su - 或者 $sudo -s (注意有- ,这和su是不同的,在用命令"su"的时候只是切换到root,但没有把root的环境变量传过去,还 ...
- 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 ...
- 【linux】xx is not in the sudoers file 解决办法
原帖地址:http://blog.sina.com.cn/s/blog_4ef045ab0100j59t.html 我用的是redhat5.4,在一般用户下执行sudo命令提示llhtiger is ...
- CentOS下解决”用户账户is not in the sudoers file“问题
如上图,在当前用户cent(我的用户名)下使用sudo命令时,提示"cent is not in the sudoers file. This incident will be report ...
- Linux有问必答:怎样解决“XXX is not in the sudoers file”错误
问题:我想在我的Linux系统上使用sudo来运行一些特权命令,然而当我试图这么做时,我却得到了"[我的用户名] is not in the sudoers file. This incid ...
- Linux下is not in the sudoers file解决方法
最近在学习linux,在某个用户(xxx)下使用sudo的时候,提示以下错误:xxx is not in the sudoers file. This incident will be reporte ...
- XXX 用户 is not in the sudoers file. This incident will be reported 的问题解决方案
说的是,这种问题,是出现在ubuntu系统里. root@SparkSingleNode:/usr/local/jdk# pwd /usr/local/jdk root@SparkSingleNode ...
- 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 ...
随机推荐
- C++软件开发面试题总结
面试题有难有易,不能因为容易,我们就轻视,更不能因为难,我们就放弃.我们面对高薪就业的态度永远不变,那就是坚持.坚持.再坚持.出现问题,找原因:遇到困难,想办法.我们一直坚信只有在坚持中才能看到希望, ...
- C# 根据BackgroundWoker异步模型和ProgressBar控件,自定义进度条控件
前言 程序开发过程中,难免会有的业务逻辑,或者算法之类产生让人能够感知的耗时操作,例如循环中对复杂逻辑处理;获取数据库百万乃至千万级数据;http请求的时候等...... 用户在使用UI操作并不知道程 ...
- ftp上传html文件
在用ftp上传当个html文件时,发现html文件会被压缩成一行,在html中的单行注释将后面的代码都注释掉了,导致网页不能正常访问. 8uftp.FlashFXP.filezilla 在这三个ftp ...
- Ubuntu18.04兼容Python2.7、Python3.6、Python3.8以及pip、pip2、pip3问题
Ubuntu18.04兼容Python2.7.Python3.6.Python3.8以及pip.pip2.pip3问题 此为记录我重装Ubuntu后安装Python的过程 安装Python3.8 目前 ...
- 【Hadoop】hdfs的秘密,namenode,datanode,yarn,安全模式,fsimage,edits...
1.bin/hdfs namenode -format ** 注意事项 1.在配置好了配置文件之后,首次启动之前,做初始化操作 2.在后续启动的时候,不需要再初始化 3.初始化的一些影响 一.初始化操 ...
- Java实现 LeetCode 566 重塑矩阵(遍历矩阵)
566. 重塑矩阵 在MATLAB中,有一个非常有用的函数 reshape,它可以将一个矩阵重塑为另一个大小不同的新矩阵,但保留其原始数据. 给出一个由二维数组表示的矩阵,以及两个正整数r和c,分别表 ...
- 【JavaScript】原生js实现:强制保留2位小数(由于toFixed()报错)
function decimal(x) { var f = parseFloat(x); if (isNaN(f)) { alert("请输入数字!"); return; } va ...
- Cypress系列(17)- 查找页面元素的辅助方法
如果想从头学起Cypress,可以看下面的系列文章哦 https://www.cnblogs.com/poloyy/category/1768839.html 前言 单一的基础定位元素方法并不一定能满 ...
- test for OCr
- ubuntu12.04可用源
最近试了不少源,都无法用.这一份是目前可以正常使用的 #deb cdrom:[Ubuntu 12.04.5 LTS _Precise Pangolin_ - Release amd64 (201408 ...