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"错误,解决 ...
随机推荐
- webapi-crud
- Ubuntu总结常用命令记录
功能: 如何看系统是多少位:命令行下uname -a 桌面下打开终端:Ctrl + Alt + T Linux下查看: 白色:表示普通文件蓝色:表示目录绿色:表示可执行文件红色:表示压缩文件浅蓝 ...
- Web安全之SQL注入攻击技巧与防范
http://www.plhwin.com/2014/06/13/web-security-sql/
- jquery复选框checkbox实现删除
实现这样一个基本需求,页面有很多数据,可以删除一条或多条,删除前判断是否选中至少一条,否则提示. function deleteUser() { //当时是想把内容以str+="" ...
- ss命令和Recv-Q和Send-Q状态
ss 用来显示处于活动状态的套接字信息.ss命令可以用来获取socket统计信息,它可以显示和netstat类似的内容.但ss的优势在于它能够显示更多更详细的有关TCP和连接状态的信息,而且比nets ...
- E:“图片视频”的列表页(taxonomy-cat_media.php)
获取本页的分类ID <?php get_header(); //获取本页的分类ID $cat_title = single_cat_title('', false); //本页分类的名称 $ca ...
- DataGridView实现各种效果
http://www.cnblogs.com/greatverve/archive/2012/03/05/multi-datagridview.html
- bat脚本参数 if goto choice for使用的学习笔记。
写过几次bat脚本,但一直没有总结,最近找到一个网页介绍bat,总结得很好,转自 http://www.jb51.net/article/49627.htm: 本文只总结我不会的,全面的看原网页就可以 ...
- 每天写点shell--命令行参数
1.读取参数:位置参数变量是标准的数字: $0是程序名, $1是第一个参数, $2是第二个参数... #!/bin/bash # using one command line parameter fa ...
- 网络第三节——NSURLSession
有的程序员老了,还没听过NSURLSession有的程序员还嫩,没用过NSURLConnection有的程序员很单纯,他只知道AFN. NSURLConnection在iOS9被宣布弃用,NSURLS ...