ubuntu:xxx is not in the sudoers file. 问题解决
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. 编辑 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
ubuntu:xxx is not in the sudoers file. 问题解决的更多相关文章
- Ubuntu下is not in the sudoers file 问题解决
在Ubuntu12.04 下,使用sudo apt-get install XXX 时,突然跳出 username is not in the sudoers file的问题 然后我一查此userna ...
- Ubuntu——"xxx is not in the sudoers file.This incident will be reported" 错误解决方法
Ubuntu下普通用户用sudo执行命令时报如题所示错误,解决方法就是在/etc/sudoers文件里给该用户添加权限.如下: 1.切换到root用户下 2./etc/sudoers文件默认是只读的, ...
- 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的用户 # ...
- Error prompt:“xxx is not in the sudoers file”----Solution
//Situation System prompts "xxx is not in the sudoers file"(xxx equals the user name) w ...
- Linux中添加管理员权限问题:xxx is not in the sudoers file. This incident will be reported.
在各个不同版本的linux中添加拥有管理员权限账户有不同的简便方式. 问题: 今天遇见将新添用户添加到root用户组后,运行sudo仍然提示 ”xxx is not in the sudoers fi ...
- CentOS7──xxx is not in the sudoers file
提示"xxx is not in the sudoers file. This incident will be reported.其中 ”XXX“是你的用户名,也就是你的用户名没有权限使用 ...
- Linux sudo 错误:XXX is not in the sudoers file 解决办法
最近在学习linux,在某个用户(xxx)下使用sudo的时候,提示以下错误:xxx is not in the sudoers file. This incident will be reporte ...
- 解决: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 ...
随机推荐
- Scrapy爬虫框架(实战篇)【Scrapy框架对接Splash抓取javaScript动态渲染页面】
(1).前言 动态页面:HTML文档中的部分是由客户端运行JS脚本生成的,即服务器生成部分HTML文档内容,其余的再由客户端生成 静态页面:整个HTML文档是在服务器端生成的,即服务器生成好了,再发送 ...
- iview 菜单数据的转换,动态加载
<template> <div class="changePassword"> <i-Menu ref="leftMenu" :t ...
- 单台PC玩转NEUTRON(一:环境准备)
要开始从事云计算网络领域的技术研究.过去10年一直是从事传统网络相关的工作,新的事务在知识结构上还有一些差异,边学边写,作为个人总结,也共享给大家. 工欲善其事必先利其器,好的开发调测环境让人学习工作 ...
- 怎么动态生成js变量
动态生成全局变量: //简单的用字符串作为变量名 window['hello'] = "hello, world"; alert(hello); //批量定义 for(var ...
- Protobuf 语言指南(proto3)
Protobuf 语言指南(proto3) Protocol Buffer是Google的语言中立的,平台中立的,可扩展机制的,用于序列化结构化数据 - 对比XML,但更小,更快,更简单.您可以定义数 ...
- 网络协议 终章 - GTP 协议:复杂的移动网络
前面都是讲电脑上网的情景,今天我们就来认识下使用最多的移动网络上网场景. 移动网络的发展历程 你一定知道手机上网有 2G.3G.4G 的说法,究竟这都是什么意思呢?有一个通俗的说法就是 ...
- Python爬虫入门教程 61-100 写个爬虫碰到反爬了,动手破坏它!
python3爬虫遇到了反爬 当你兴冲冲的打开一个网页,发现里面的资源好棒,能批量下载就好了,然后感谢写个爬虫down一下,结果,一顿操作之后,发现网站竟然有反爬措施,尴尬了. 接下来的几篇文章,我们 ...
- BeetleX和Asp.net Core之webapi基础性能对比
本文主要针对BeetleX和Asp.net Core在基础WebApi功能性能对比 测试环境描述 硬件配置:E1230V2 16G内存 10Gb带宽 操作系统:Windows server 2008 ...
- 从零到一详聊如何创建Vue工程及遇到的常见问题
前言 本文也会在github上我的web-study仓库中同步更新,欢迎star. 戳这里,传送 准备工作 判断是否需要FQ或安装镜像,镜像一般可安装国内淘宝镜像,详情可看这里:cnpm npm in ...
- windows代码,传入文件名,遍历此目录下所有文件.
#include <windows.h> #include <vector> using namespace std; BOOL IterAtorFileSaveFile(IN ...