Linux ->> <user_name> not in the sudoers file. This incident will be reported.
昨天在用sudo命令执行mkdir命令的时候发生了错误。错误提示如下:
hadoop@master:/home$ sudo mkdir /home/hadoop
[sudo] password for hadoop:
hadoop is not in the sudoers file. This incident will be reported.
原因是当前用户没有借用root权限去执行后面命令的权限,默认是只有admin组的成员才有这个权限的。那是在哪设定这个东西的呢?
答案就是visudo命令进入/etc/sudoers文件的编辑模式去设定(需要以root用户)。
添加下面这条记录
<user_name> ALL=(ALL) ALL
比如:
# User privilege specification
root ALL=(ALL:ALL) ALL
hadoop ALL=(ALL) ALL
意思让用户hadoop可以取得root权限去做任何事情
参考:
How do I add myself into the sudoers group?
Linux ->> <user_name> not in the sudoers file. This incident will be reported.的更多相关文章
- Linux中添加管理员权限问题:xxx is not in the sudoers file. This incident will be reported.
在各个不同版本的linux中添加拥有管理员权限账户有不同的简便方式. 问题: 今天遇见将新添用户添加到root用户组后,运行sudo仍然提示 ”xxx is not in the sudoers fi ...
- 解决linux下sudo更改文件权限报错xxxis not in the sudoers file. This incident will be reported.
本文转自Linux社区作者为z-sm的文章 原文链接http://www.linuxidc.com/Linux/2016-07/133066.htm 之前一直使用的是ubuntu,后来安装了Cento ...
- 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 ...
- 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命令时会报下面的 ...
- 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 ...
- XXX is not in the sudoers file. This incident will be reported 的问题解决方案
不多说,直接上干货! 说的是,这种问题,是出现在ubuntu系统里. root@SparkSingleNode:/usr/local/jdk# pwd /usr/local/jdk root@Spar ...
- 解决:xxx is not in the sudoers file.This incident will be reported.的解决方法
Linux中普通用户用sudo执行命令时报”xxx is not in the sudoers file.This incident will be reported”错误,解决方法就是在/etc/s ...
- sudo 提示 'xxx is not in the sudoers file.This incident will be reported.的解决方法'
在使用 Linux 的过程中,有时候需要临时获取 root 权限来执行命令时,一般通过在命令前添加 sudo 来解决. 但是第一次使用 sudo 时,有可能会得到这样一个错误提示 xxx is not ...
- centos添加和删除用户及 xxx is not in the sudoers file.This incident will be reported.的解决方法
修改主机名:vim /etc/sysconfig/network 1.添加用户,首先用adduser命令添加一个普通用户,命令如下: #adduser tommy //添加一个名为tommy的用户 # ...
随机推荐
- post调试postman
载地址:https://www.getpostman.com/ 教程地址:http://www.cnblogs.com/s380774061/p/4624326.html
- Docker搭建tomcat运行环境(修改镜像方式)
对于java程序员来说,要想使用Docker来部署你的应用,那么在镜像中安装类似于tomcat的容器基本上是必须的(sprintboot项目除外),本篇介绍自己基于对centos镜像的修改,创建自己的 ...
- Git学习系列之Git是什么?
前言 现在主流IDE里,都集成git了. https://git-scm.com/docs 史上最浅显易懂的Git教程! 为什么要编写这个教程?因为我在学习Git的过程中,买过书,也在网上Google ...
- SSH框架学习步骤
Hibernate 对象状态 关系映射 SQL语句 缓存抓取 struts action的分发配置 参数传递 文件上传 spring IOC AOP
- 关于JS闭包
今天在敲代码的时候,发现很多JQ插件在写闭包的时候都会用到下面的写法: (function ($) { ... })(jQuery); 一时的好奇心驱使,我研究起了这一写法来.大家都知道,在 $ 没有 ...
- Android OpenGL教程-第三课【转】
第三课 给多边形上色: 作为第二课的扩展,我将叫你如何使用颜色.你将理解两种着色模式,在左图中,三角形用的是光滑着色,四边形用的是平面着色. 这次增加的代码不算多. 增加一个color的buffer ...
- cs端调用webApi
public class Httphelper { public static string Post1(string url, string postString) { using (WebClie ...
- yum -y update 报错:GPG key retrieval failed: [Errno 14] Could not open/read file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
用的是centos6.5的镜像,yum源太老了,修改了之后想更新一下: yum -y update 执行报错: warning: rpmts_HdrFromFdno: Header V3 RSA/SH ...
- Windows Server 2008系统中IE8启用和禁用JS
Windows Server 2008系统中IE8默认是启用IE ESC(ie 增强)的,这样会导致该IE不支持JS,开启方法: 1.开始->管理工具->服务器管理器 2.点击服务器管理- ...
- [转]VS清除打开项目时的TFS版本控制提示
本文转自:http://www.cnblogs.com/weixing/p/5219294.html 对于曾经做过TFS版本控制的项目,在版本控制服务不可用的时候,依然会在每次打开项目的时候都提示:当 ...