昨天在用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.的更多相关文章

  1. Linux中添加管理员权限问题:xxx is not in the sudoers file. This incident will be reported.

    在各个不同版本的linux中添加拥有管理员权限账户有不同的简便方式. 问题: 今天遇见将新添用户添加到root用户组后,运行sudo仍然提示 ”xxx is not in the sudoers fi ...

  2. 解决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 ...

  3. 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 ...

  4. 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命令时会报下面的 ...

  5. 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 ...

  6. XXX is not in the sudoers file. This incident will be reported 的问题解决方案

    不多说,直接上干货! 说的是,这种问题,是出现在ubuntu系统里. root@SparkSingleNode:/usr/local/jdk# pwd /usr/local/jdk root@Spar ...

  7. 解决: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 ...

  8. sudo 提示 'xxx is not in the sudoers file.This incident will be reported.的解决方法'

    在使用 Linux 的过程中,有时候需要临时获取 root 权限来执行命令时,一般通过在命令前添加 sudo 来解决. 但是第一次使用 sudo 时,有可能会得到这样一个错误提示 xxx is not ...

  9. centos添加和删除用户及 xxx is not in the sudoers file.This incident will be reported.的解决方法

    修改主机名:vim /etc/sysconfig/network 1.添加用户,首先用adduser命令添加一个普通用户,命令如下: #adduser tommy //添加一个名为tommy的用户 # ...

随机推荐

  1. JS获取后台返回的JSON数据

    问题:通过$.get从后台获取了一段json串{"id":"1","name":"ww"},然后要拿到这里面的id和na ...

  2. js中的 == 与 === 、永远不要使用 ==

    前言: 很久没有复习基础了,所以导致做项目的时候被坑,咳咳,基础还是很重要的. === 是没有强制类型转换的,和其他大部分语言的 == 是一样的.而js中 == 是有类型转换的,这也是js饱受诟病的原 ...

  3. Git学习系列之Git的功能特性(从一般开发者的角度和主开发者的角度来剖析)

    不多说,直接上干货! Git的功能特性,从一般开发者和主开发者的角度来进行剖析. Git的功能特性: 从一般开发者的角度来看,Git有以下功能: 1.从服务器上克隆完整的Git仓库(包括代码和版本信息 ...

  4. Xcode日常使用

    1.构建输出目录(Preferences->Locations->Locations)当选择为Default时,Derived Data的目录为~/Library/Developer/Xc ...

  5. Delphi下OpenGL2d绘图(01)-初始化

    一.前言: Delphi默认支持OpenGl,可以uses OpenGL单元进行引用,便可以使用OpenGL的函数.OpenGl是跨平台的,而且Windows很早就支持并集成在系统中,存在于syste ...

  6. Fastreport史无前例5折,仅十天快抢!

    慧都十年第一弹,与全球顶级报表控件厂商Fastreport携手同欢:仅仅十天,仅仅提供给慧都控件网,Fastreport旗下全部产品,全部5折!立即订购>> 慧都作为中国第一家与其建立合作 ...

  7. JS大写转小写小写转大写,JS字符串大小写互换

    Array.prototype.map.call(str,a=>a.toUpperCase(a)==a?a.toLowerCase():a.toUpperCase()).join(''); 效果 ...

  8. ThreadLocal介绍以及源码分析

    ThreadLocal 线程主变量 前面部分引用其他优秀博客,后面源码自己分析的,如有冒犯请私聊我. 用Java语言开发的同学对 ThreadLocal 应该都不会陌生,这个类的使用场景很多,特别是在 ...

  9. JDBC编程错误:Exception in thread "main" java.sql.SQLException: Access denied for user ''@'localhost' (using password: YES)

    出现上面的错误是因为连接数据库的用户名不对或密码赋值不对,请对用户名和密码进行检查. 或者在程序中没有获取到正确的用户名或密码.看是否少写了用户名或密码.

  10. StringBuffer总结分析

    构造方法 /** * Constructs a string buffer with no characters in it and an * initial capacity of 16 chara ...