前言: 自己想额外创建一个Linux账户,但是发现新创建的用户(lgq)并不能使用sudo指令. 但是在安装系统时创建的用户(abc)是可以正常使用的. 原因是新创建的用户并没有被赋予使用sudo指令的权限. 解决方案: 1. 切换到能使用root权限的用户 (如我的abc用户) su abc 2. 使用root权限修改sudoers文件 (sudoers文件规定了哪些用户可以使用root权限) sudo vim /etc/sudoers 本文博客地址:http://www.cnblogs.co…
提示错误信息 www@iZ236j3sofdZ:~$ ifconfig Command 'ifconfig' is available in '/sbin/ifconfig' The command could not be located because '/sbin' is not included in the PATH environment variable. This is most likely caused by the lack of administrative privil…
ubuntu 下普通用户用 sudo 执行命令时报 "xxx is not in the sudoers file.This incident will be reported" 错误,解决方法是在 /etc/sudoers 文件里给该用户添加权限.操作过程如下: 1. 切换到 root 用户下 2. /etc/sudoers 文件默认是只读的,对 root 来说也是,因此需先添加 sudoers 文件的写权限,命令是: chmod u+w /etc/sudoers 3. 编辑 sud…
用adduser新建的用户,当时只输入了一个用户名,没做其它操作,这样就建立了一个normal用户.在执行sudo vim hadoop-env.sh时,报“*** is not in the sudoers file.  This incident will be reported.”. 经查询,网上的解决方案大多数都是: 执行visudo或vim /etc/sudoers命令,然后在root用户下面增加<username> ALL=(ALL) ALL 我相信这样一定可以解决问题,但这是杀鸡…
转自:http://www.linuxidc.com/Linux/2010-12/30386.htm 1)进入到root用户下. 2)添加文件的写权限.也就是输入命令"chmod u+w /etc/sudoers".3)编辑/etc/sudoers文件.也就是输入命令"gedit /etc/sudoers",进入编辑模式,找到这一 行:"root ALL=(ALL) ALL"在起下面添加"yourName ALL=(ALL) ALL&q…
Ubuntu sudo 免密码之 sudoers 修改 重要提示: 本文内容仅在虚拟机上实验通过.如果你不确信这个过程,请不要擅自改变/etc/sudoers.否则可能导致你的机器不可用.本文对由此产生的任何后果概不负责! 假设我的用户car是Ubuntu安装的第一个用户,默认有管理员的权限.登录系统执行root权限下的命令,需要: car@pc1:~$ sudo apt-get install xyz-0.1 然后系统会提示输入密码. 而我们的car是root组下的,我们不希望每次都输入密码,…
sudo 使用不了,报错: the permissions on the /etc/sudoers file are changed to something other than 0440 how to fix it: 本次操作目的: 修复切换sudo 时报错: /etc/sudoers, 应该是0440 权限. 重启服务器后, • 方法一:通过recover mode ,进入root shell 进入GNU GRUB 界面: 选择Advanced options for Ubuntu 选择r…
本文由荒原之梦原创,原文链接:http://zhaokaifeng.com/?p=624 问题描述: 之前在使用Fedora系统时遇到过在使用 sudo 时提示"YourUserName不在sudoers文件中.此事将被报告"的问题,当时的博文在这里.这次是在Ubuntu上遇到了这样的问题.该问题发生之前我在Ubuntu上新建了一个管理员类型的用户,结果我在原来的用户下 使用 sudo 就产生了如上报错.当我尝试使用之前在Fedora上解决该问题所使用的方法时却发现不只是 sudo 不…
本文转自Linux社区作者为z-sm的文章 原文链接http://www.linuxidc.com/Linux/2016-07/133066.htm 之前一直使用的是ubuntu,后来安装了Centos..切换过程中出现了错误.后来在网上找到了问题解决的方法,分享一下.希望能帮助到大家.此文转载的 Linux中普通用户用sudo执行命令时报”xxx is not in the sudoers file.This incident will be reported”错误,解决方法就是在/etc/s…
ubuntu sudo update与upgrade的作用及区别 入门linux的同志,刚开始最迫切想知道的,大概一个是中文输入法,另一个就是怎么安装软件.本文主要讲一下LINUX安装软件方面的特点.在windows下安装软件,我们只需要有EXE文件,然后双击,下一步直接OK就可以了.但在LINUX下,不是这样的.每个LINUX的发行版,比如UBUNTU,都会维护一个自己的软件仓库,我们常用的几乎所有软件都在这里面.这里面的软件绝对安全,而且绝对的能正常安装.那我们要怎么安装呢?在UBUNTU下…
1.首先查看目标用户的信息,包括所属组: ◄► id cason uid=(cason) gid=(cason) (cason),(adm),(cdrom),((dip),(plugdev),(lpadmin),(sambashare),(libvirtd) ◄► 2.修改 /etc/sudoers 文件如下(注意红色标记的地方): # # This file MUST be edited with the 'visudo' command as root. # # Please conside…
在Ubuntu12.04 下,使用sudo apt-get install XXX 时,突然跳出 username is not in the sudoers file的问题 然后我一查此username的类型,果然是标准用户而不是管理员用户 解决问题至少有两种方法: 一.System Settings ->User Accounts -> 点击Unlock ->输入rootpassword -> 改动AccountType(用户类型)为Administrator(管理员) -&g…
最近在学习linux,在某个用户(xxx)下使用sudo的时候,提示以下错误:xxx is not in the sudoers file. This incident will be reported. 百度了下,究其原因是用户没有加入到sudo的配置文件里. 解决方法如下: 1.切换到root用户,运行visudo命令 2.找到root ALL=(ALL) ALL,在下面添加一行 xxx ALL=(ALL) ALL 其中xxx是要加入的用户名称…
参考:https://blog.csdn.net/lichangzai/article/details/39501025 如果执行sudo命令的用户没有执行sudo的权限,执行sudo命令时会报下面的错 [rootr@localhost ]# sudo yum install gcc-c++ rootr is not in the sudoers file.This incident will be reported 设置用户执行sudo命令权限,建议这些操作都在secureCRT内进行要不然当…
在使用 Linux 的过程中,有时候需要临时获取 root 权限来执行命令时,一般通过在命令前添加 sudo 来解决. 但是第一次使用 sudo 时,有可能会得到这样一个错误提示 xxx is not in the sudoers file.This incident will be reported.的解决方法 xxx代表你当前的用户名. 出现该问题的原因是,在通过 sudo 获取 root 权限之前,用户需要先获得使用 sudo 命令的权限. 通过简单的搜索,我得知 sudo 命令的配置由…
当我在postgres用户下去执行sudo vim demo.sql需要用管理员权限运行时,并且输入本用户的密码,但是输入之后提示如下: postgers is not in the sudoers file. This incident will be reported 翻译一下:postgres 不在sudoers文件中.将报告此事件. 这时候我们可以根据提示去找到这个 sudoers file .也就是就是在/etc/sudoers文件里给该用户添加权限. 解决方法如下: 1.切换到roo…
Ubuntu sudo 出现unable to resolve host 解决方法 Ubuntu环境, 假设这台机器名字叫abc(机器的hostname), 每次执行sudo 就出现这个警告讯息: sudo: unable to resolve host abc 虽然sudo 还是可以正常执行, 所以就直接从/etc/hosts 设定, 让abc(hostname) 可以解回127.0.0.1 的IP 即可. 在127.0.0.1 localhost 后面加上主机名称(hostname) 即可:…
说的是,这种问题,是出现在ubuntu系统里. root@SparkSingleNode:/usr/local/jdk# pwd /usr/local/jdk root@SparkSingleNode:/usr/local/jdk# su spark spark@SparkSingleNode:/usr/local/jdk$ sudo cp /home/spark/Downloads/Spark_Cluster_Software/jdk-8u60-linux-x64.tar.gz  /usr/l…
不多说,直接上干货! 说的是,这种问题,是出现在ubuntu系统里. root@SparkSingleNode:/usr/local/jdk# pwd /usr/local/jdk root@SparkSingleNode:/usr/local/jdk# su spark spark@SparkSingleNode:/usr/local/jdk$ sudo cp /home/spark/Downloads/Spark_Cluster_Software/jdk-8u60-linux-x64.tar…
准备把OS的root禁用了,所以其他用户要执行使用root执行的操作时,需要使用sudo. 在没有配置sudo的时候,执行sudo会出现类似以下的报错: [oracle@test ~]$ sudo /u01/app/oracle/product/11.1/db_1/root.shPassword: oracle is not in the sudoers file. This incident will be reported. 解决办法: 1.切换到root用户下 2.添加sudo文件的写权限…
修改主机名:vim /etc/sysconfig/network 1.添加用户,首先用adduser命令添加一个普通用户,命令如下: #adduser tommy //添加一个名为tommy的用户 #passwd tommy   //修改密码 Changing password for user tommy. New UNIX password:     //在这里输入新密码 Retype new UNIX password:  //再次输入新密码 passwd: all authenticat…
解决方案:首需要切换到root身份$su - 或者 $sudo -s (注意有- ,这和su是不同的,在用命令"su"的时候只是切换到root,但没有把root的环境变量传过去,还是当前用户的环境变量,用"su -"命令将环境变量也一起带过去,就象和root登录一样) 然后$visudo     //切记,此处没有vi和sudo之间没有空格 1.移动光标,到最后一行2.按a,进入append模式3.输入your_user_name ALL=(ALL)  ALL4.按…
原帖地址:http://blog.sina.com.cn/s/blog_4ef045ab0100j59t.html 我用的是redhat5.4,在一般用户下执行sudo命令提示llhtiger is not in the sudoers file. This incident will be reported.解决方法: 一.$whereis sudoers -------找出文件所在的位置,默认都是/etc/sudoers 二. #chmod u+w /etc/sudoers 以超级用户登录s…
如上图,在当前用户cent(我的用户名)下使用sudo命令时,提示"cent is not in the sudoers file. This incident will be reported. "问题. 出现此问题,主要是因为用户名cent尚未获取sudo权限,所以需要修改配置文件/etc/sudoers. 修改如下: 首先以root权限登陆,即输入语句:su -,该语句等同于su - root,注意空格. 接下来修改sudoers配置文件,即:visudo.若想查看visudo的…
问题:我想在我的Linux系统上使用sudo来运行一些特权命令,然而当我试图这么做时,我却得到了"[我的用户名] is not in the sudoers file. This incident will be reported."的错误信息.我该怎么处理这种sudo错误呢? sudo是一个允许特定的用户组用另一个用户(典型的是root)的特权来运行一个命令.sudo有详细的日志功能,并且提供了对用户可通过sudo来运行哪些命令的细粒度控制. Sudo vs. Su su命令也提供了…
最近在学习linux,在某个用户(xxx)下使用sudo的时候,提示以下错误:xxx is not in the sudoers file. This incident will be reported. 百度了下,究其原因是用户没有加入到sudo的配置文件里. 解决方法如下:  1.切换到root用户,运行visudo命令  2.找到root ALL=(ALL) ALL,在下面添加一行 xxx ALL=(ALL) ALL 其中xxx是要加入的用户名称…
//Situation    System prompts "xxx is not in the sudoers file"(xxx equals the user name) while executing command "sudo": sudo -i Password: xxx is not in the sudoers file. This incident will be reported. //Analysis    The current accoun…
用sudo时提示"xxx is not in the sudoers file. This incident will be reported.其中XXX是你的用户名,也就是你的用户名没有权限使用sudo,我们只要修改一下/etc/sudoers文件就行了. 1)进入超级用户模式.也就是输入"su -",系统会让你输入超级用户密码,输入密码后就进入了超级用户模式.(当然,你也可以直接用root用)(注意有- ,这和su是不同的,在用命令”su”的时候只是切换到root,但没有…
在各个不同版本的linux中添加拥有管理员权限账户有不同的简便方式. 问题: 今天遇见将新添用户添加到root用户组后,运行sudo仍然提示 ”xxx is not in the sudoers file.  This incident will be reported.“ 的问题.经过分析是在/etc/sudoers中的用户组未指定该组拥有所有权限. 解决方法: 最好不要将用户添加到root用户组,不妨我们新建个用户组sudo :使用命令 sudo groupadd sudo 编辑/etc/s…
当在终端执行sudo命令时,系统提示"hadoop is not in the sudoers file": 其实就是没有权限进行sudo,解决方法如下(这里假设用户名是cuser): 1.切换到超级用户:$ su 2.打开/etc/sudoers文件:$vim /etc/sudoers 3.修改文件内容: 找到"root    ALL=(ALL)       ALL"一行,在下面插入新的一行,内容是"hadoop   ALL=(ALL)       AL…