UBuntu sudo 命令 :xxx is not in the sudoers file. This incident will be reported.
【1】分析问题
提示内容翻译成中文即:用户XXX(一般是新添加的用户名称)没有权限使用sudo。
解决方法修改新用户的权限,具体操作即修改一下/etc/sudoers文件。
【2】切换至root用户模式
命令:su -
备注:这里命令加有"-" ,与su是不同的。
在用命令"su"时只是切换到root,但没把root的环境变量传过去,还是当前用户的环境变量。
而用"su -"命令会将环境变量也一起切换过去(可以亲测,两个命令后分别查看环境变量$PATH),就像是root登录一样。
【3】修改文件的写权限
命令:chmod u+w /etc/sudoers
【4】编辑文件内容
命令:gedit /etc/sudoers
打开文件后,查找 root ALL=(ALL) ALL 这行
在此行下面添加一行:
XXX ALL=(ALL) ALL
其中,XXX就是用户名。记得要保存。
【5】撤销文件的写权限
命令:chmod u-w /etc/sudoers
【6】验证问题。切换到用户XXX
命令:su XXX
输入用户对应的登陆密码。
sudo命令可以正常使用。
Good Good Study,Day Day Up.
顺序 选择 循环 总结
UBuntu sudo 命令 :xxx is not in the sudoers file. This incident will be reported.的更多相关文章
- sudo 提示 'xxx is not in the sudoers file.This incident will be reported.的解决方法'
在使用 Linux 的过程中,有时候需要临时获取 root 权限来执行命令时,一般通过在命令前添加 sudo 来解决. 但是第一次使用 sudo 时,有可能会得到这样一个错误提示 xxx is not ...
- 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 ...
- centos添加和删除用户及 xxx is not in the sudoers file.This incident will be reported.的解决方法
修改主机名:vim /etc/sysconfig/network 1.添加用户,首先用adduser命令添加一个普通用户,命令如下: #adduser tommy //添加一个名为tommy的用户 # ...
- Linux中添加管理员权限问题:xxx is not in the sudoers file. This incident will be reported.
在各个不同版本的linux中添加拥有管理员权限账户有不同的简便方式. 问题: 今天遇见将新添用户添加到root用户组后,运行sudo仍然提示 ”xxx is not in the sudoers fi ...
- 解决: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 ...
- 企业运维案例:xxx is not in the sudoers file.This incident will be reported” 错误解决方法
CentOS6系统下,普通用户使用sudo执行命令时报错: xxx is not in the sudoers file.This incident will be reported" 解决 ...
- XXX is not in the sudoers file. This incident will be reported 的问题解决方案
不多说,直接上干货! 说的是,这种问题,是出现在ubuntu系统里. root@SparkSingleNode:/usr/local/jdk# pwd /usr/local/jdk root@Spar ...
- Ubuntu——"xxx is not in the sudoers file.This incident will be reported" 错误解决方法
Ubuntu下普通用户用sudo执行命令时报如题所示错误,解决方法就是在/etc/sudoers文件里给该用户添加权限.如下: 1.切换到root用户下 2./etc/sudoers文件默认是只读的, ...
- xxx is not in the sudoers file.This incident will be reported.的解决方法 (一般用户不能执行sudo)
1.切换到root用户下 2.添加sudo文件的写权限,命令是:chmod u+w /etc/sudoers 3.编辑sudoers文件vi /etc/sudoers找到这行 root ALL=(AL ...
随机推荐
- 洛谷P3121 审查(黄金)Censoring(Gold) [USACO15FEB] AC自动机
正解:AC自动机 解题报告: 传送门! 啊我好呆啊其实就挺模板题的,,,只是要一个栈搞一下,,,然后我就不会了,,,是看了题解才get的,,,QAQ 然后写下解法趴QwQ 首先看到多串匹配不难想到AC ...
- CentOS安装HBase
1.下载HBASE http://www.apache.org/dyn/closer.cgi/hbase/ 2.解压文件到安装目录 #mkdir hbase #cd hbase #tar -zxvf ...
- 3.0-uC/OS-III简介(操作系统结构)
1.OS-III是一个第 3代的系统内核,支持现代的实时内核所期待的大部分功能. 例如资源管理, 同步, 任务间的通信等等.然而, uC/OS-III提供的特色功能在其它的实时内核中是找不到的, 比如 ...
- iOS 允许po打印frame等内容
终端: 1. touch ~/.lldbinit 2. echo display @import UIKit >> ~/.lldbinit 3. echo target stop-hook ...
- mysql 数据库操作 数据库的增删改查
一 系统数据库 information_schema: 虚拟库,不占用磁盘空间,存储的是数据库启动后的一些参数,如用户表信息.列信息.权限信息.字符信息等performance_schema: MyS ...
- HBase 的MOB压缩分区策略介绍
版权声明:本文为博主原创文章.未经博主同意不得转载. https://blog.csdn.net/zNZQhb07Nr/article/details/79832392 HBase应用场景很广泛.社区 ...
- 回文字符串 NYOJ
# include<iostream> # include<string> # include<string.h> # include<queue> # ...
- mysql相关SQL
1.mysql分组获取最新数据 sql> select max(column_name) from table group by column_name having count(*) orde ...
- windows下使用pyinstaller把python文件打包成exe可执行文件
使用pyinstaller打包有个好处就是所有依赖都打包进去了,可以随意把文件移动到别的电脑上使用 安装 pip install pyinstaller 新建一个demo.py文件 #!/usr/bi ...
- git 查看某个文件的修改记录
有几种方式, (1)如果是在linux环境下,比如centos,ubuntu之类的,建议安装tig命令 炒鸡好用,tig后面可以跟文件或者文件夹,比如: (1.1)tig dir_name (1.2 ...