oracle is not in the sudoers file. This incident will be reported.
准备把OS的root禁用了,所以其他用户要执行使用root执行的操作时,需要使用sudo。
在没有配置sudo的时候,执行sudo会出现类似以下的报错:
[oracle@test ~]$ sudo /u01/app/oracle/product/11。1/db_1/root。sh
Password:
oracle is not in the sudoers file。 This incident will be reported。
解决办法:
1.切换到root用户下
2.添加sudo文件的写权限:
chmod u+w /etc/sudoers
3.编辑sudoers文件
vi /etc/sudoers
找到这行 root ALL=(ALL) ALL,在下面添加xxx ALL=(ALL) ALL (这里的xxx是需要添加进去的用户名)
ps: sudoers添加下面四行中任意一条
youuser ALL=(ALL) ALL
%youuser ALL=(ALL) ALL
youuser ALL=(ALL) NOPASSWD: ALL
%youuser ALL=(ALL) NOPASSWD: ALL
第一行:允许用户youuser执行sudo命令(需要输入密码)。
第二行:允许用户组youuser里面的用户执行sudo命令(需要输入密码)。
第三行:允许用户youuser执行sudo命令,并且在执行的时候不输入密码。
第四行:允许用户组youuser里面的用户执行sudo命令,并且在执行的时候不输入密码。
4.撤销sudoers文件写权限:
chmod u-w /etc/sudoers
如果不撤销会报错:
[oracle@test ~]$ sudo /u01/app/oracle/product/11.1/db_1/root.sh
sudo: /etc/sudoers is mode 0640, should be 0440
这样非root用户就可以使用sudo了
oracle is not in the sudoers file. This incident will be reported.的更多相关文章
- Linux中新建用户用不了sudo命令问题:rootr is not in the sudoers file.This incident will be reported解决
参考:https://blog.csdn.net/lichangzai/article/details/39501025 如果执行sudo命令的用户没有执行sudo的权限,执行sudo命令时会报下面的 ...
- centos添加和删除用户及 xxx is not in the sudoers file.This incident will be reported.的解决方法
修改主机名:vim /etc/sysconfig/network 1.添加用户,首先用adduser命令添加一个普通用户,命令如下: #adduser tommy //添加一个名为tommy的用户 # ...
- XXX 用户 is not in the sudoers file. This incident will be reported 的问题解决方案
说的是,这种问题,是出现在ubuntu系统里. root@SparkSingleNode:/usr/local/jdk# pwd /usr/local/jdk root@SparkSingleNode ...
- Linux中添加管理员权限问题:xxx is not in the sudoers file. This incident will be reported.
在各个不同版本的linux中添加拥有管理员权限账户有不同的简便方式. 问题: 今天遇见将新添用户添加到root用户组后,运行sudo仍然提示 ”xxx is not in the sudoers fi ...
- XXXX is not in the sudoers file. This incident will be reported解决方法
假设你用的是Red Hat系列(包括Fedora和CentOS)的Linux系统.当你执行sudo命令时可能会提示“某某用户 is not in the sudoers file. This inc ...
- sunzl is not in the sudoers file.This incident will be reported
Description: [sunzl@localhost nuc900bsp$] ./install.sh sorry!you are not the root !! [sunzl@localhos ...
- 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 ...
- XXX is not in the sudoers file. This incident will be reported 的问题解决方案
不多说,直接上干货! 说的是,这种问题,是出现在ubuntu系统里. root@SparkSingleNode:/usr/local/jdk# pwd /usr/local/jdk root@Spar ...
- lxs1314 is not in the sudoers file. This incident will be reported.
虚拟机下面 普通用户用sudo执行命令时报"xxx is not in the sudoers file.This incident will be reported"错误,解决 ...
随机推荐
- CMake
使用CMake编译跨平台静态库 http://www.tuicool.com/articles/3uu2Yj cmake命令 安装.用法简介 https://fukun.org/archives/04 ...
- 阿里笔试题:在n个人中找明星
题目描述:有N个人,其中一个明星和n-1个群众,群众都认识明星,明星不认识任何群众,群众和群众之间的认识关系不知道,现在如果你是机器人R2T2,你每次问一个人是否认识另外一个人的代价为O(1),试设计 ...
- [译]你应该知道的4种JavaScript设计模式
这里介绍下面这4种设计模式 Module Prototype Observer Singleton 每种模式有许多属性构成,在这我只强调一下几点: 1 Context: 在何种情况使用哪种模式? 2 ...
- Ubuntu Server 12.04下部署glusterfs
1.安装环境 Linux:Ubuntuserver 12.04.1 LTS 64bit 2台 分布式文件系统:Gluster 测试环境:一台作文件服务器端(192.168.56.133),一台作客户端 ...
- Sql Server 学习链接
避免SQL全表查询:http://www.dedecms.com/knowledge/data-base/sql-server/2012/0821/11698.html?jdfwkey=n3nuq
- [转]socket 通俗解释
socket是网络编程的基础,本文用打电话来类比socket通信中建立TCP连接的过程. socket函数,表示你买了或者借了一部手机. bind函数,告诉别人你的手机号码,让他们给你打电 ...
- acm小知识
__builtin_popcount(i); __builtin_popcountll(i) ;//计算i的二进制表示中1的个数 int a[M] , b[M] ; memcpy(a+i , b+j ...
- entityframework
entityframework扩展: http://entityframework-plus.net/
- MySQL索引类型总结和使用技巧以及注意事项
索引是快速搜索的关键.MySQL索引的建立对于MySQL的高效运行是很重要的.下面介绍几种常见的MySQL索引类型 在数据库表中,对字段建立索引可以大大提高查询速度.假如我们创建了一个 mytable ...
- ES6学习笔记一
块级作用域:在ES5中只有全局作用域与函数作用域,ES6中新增的块级作用域避免变量的覆盖与泄露.考虑到代码运行环境,在块级作用域中应避免声明函数,最好用函数表达式的方式声明. let与const:le ...