Ubuntu sudo 出现 is not in the sudoers file解决方案
前言:
自己想额外创建一个Linux账户,但是发现新创建的用户(lgq)并不能使用sudo指令。
但是在安装系统时创建的用户(abc)是可以正常使用的。
原因是新创建的用户并没有被赋予使用sudo指令的权限。
解决方案:
1. 切换到能使用root权限的用户
(如我的abc用户)
su abc
2. 使用root权限修改sudoers文件
(sudoers文件规定了哪些用户可以使用root权限)
sudo vim /etc/sudoers
本文博客地址:http://www.cnblogs.com/toulanboy/
3. 在该文件中添加一行
(your_username是你想使用root权限的用户名)
your_username ALL=(ALL) ALL
4. 按Esc,输入:wq!保存退出
(注意,这是个只读文件,即使是root权限,也需要加!强制修改)
:wq!
参考:https://www.linuxidc.com/Linux/2010-12/30386.htm
Ubuntu sudo 出现 is not in the sudoers file解决方案的更多相关文章
- 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 ...
- ubuntu:xxx is not in the sudoers file. 问题解决
ubuntu 下普通用户用 sudo 执行命令时报 "xxx is not in the sudoers file.This incident will be reported" ...
- 解决ubuntu系统“XXX is not in the sudoers file”错误
用adduser新建的用户,当时只输入了一个用户名,没做其它操作,这样就建立了一个normal用户.在执行sudo vim hadoop-env.sh时,报“*** is not in the sud ...
- Ubuntu技巧之 is not in the sudoers file解决方法
转自:http://www.linuxidc.com/Linux/2010-12/30386.htm 1)进入到root用户下. 2)添加文件的写权限.也就是输入命令"chmod u+w / ...
- Ubuntu sudo 免密码之 sudoers 修改
Ubuntu sudo 免密码之 sudoers 修改 重要提示: 本文内容仅在虚拟机上实验通过.如果你不确信这个过程,请不要擅自改变/etc/sudoers.否则可能导致你的机器不可用.本文对由此产 ...
- sudo 使用不了, the permissions on the /etc/sudoers file are changed to something other than 0440
sudo 使用不了,报错: the permissions on the /etc/sudoers file are changed to something other than 0440 how ...
- Ubuntu系统下解决“YourUserName不在sudoers文件中。此事将被报告”的问题
本文由荒原之梦原创,原文链接:http://zhaokaifeng.com/?p=624 问题描述: 之前在使用Fedora系统时遇到过在使用 sudo 时提示"YourUserName不在 ...
- 解决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 ...
- ubuntu sudo update与upgrade的作用及区别
ubuntu sudo update与upgrade的作用及区别 入门linux的同志,刚开始最迫切想知道的,大概一个是中文输入法,另一个就是怎么安装软件.本文主要讲一下LINUX安装软件方面的特点. ...
随机推荐
- 前端开发 - Emmet使用手册
Emmet (前身为 Zen Coding) 是一个能大幅度提高前端开发效率的一个工具: 基本上,大多数的文本编辑器都会允许你存储和重用一些代码块,我们称之为"片段".虽然片段能很 ...
- jmeter diff测试
1.准备接口数据(对比字段,即json数据中需要提取的key对应的值进行对比) 2.配置获取EXCEL数据 3.新建线程,并建两个http请求,分别用于请求新旧接口 4.提取需要对比的内容 5.赋值变 ...
- [hdu1686] Oulipo【KMP】
传送门:http://acm.hdu.edu.cn/showproblem.php?pid=1686 保存KMP模版,代码里P是模版串,next[]就是为它建立的.T是文本串,就是一般比较长的.nex ...
- Ubuntu下修改权限时出现"unable to execute /bin/chmod: Argument list too long"
Ubuntu14.04下修改权限时出现"unable to execute /bin/chmod: Argument list too long" ,大概意思是卧槽,你这参数也 ...
- Linux--NiaoGe-Service-05
1.设置网络参数的命令 命令名称 作用 ifconfig 查询.设置网卡与IP网络等相关参数 ifup.ifdown 启动.关闭网络接口 route 查看配置路由表(route table) ip 整 ...
- No bean named 'springSecurityFilterChain' is defined
1.问题 本文讨论Spring安全配置问题 - 应用程序引导过程抛出以下异常: SEVERE: Exception starting filter springSecurityFilterChain ...
- IIS网站设置禁止IP访问设置方法
本文设置系统为Windows2003.IIS版本是6.0. 打开IIS管理器,在iis管理器左侧单击打开网站下面的相应需要设置的网站,并在此网站上右键,选择属性,即可打开该网站属性进行相关设置. (i ...
- jq或zp监听input的value改变问题
$(document).on('input propertychange','#citySelectorValue',function () { alert("s"); } 以上J ...
- 定时任务-Timer
Timer类的全限定名 java.util.Timer java.util.Timer类的构造函数 public Timer(); public Timer(boolean isDaemon); pu ...
- leetcode542 01 Matrix
思路: 多个起点的bfs. 实现: class Solution { public: vector<vector<int>> updateMatrix(vector<ve ...