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安装软件方面的特点. ...
随机推荐
- assembly x86(nasm)的日常
cs的日常打卡. data segment ENG db 'SUNdayS Coming I Wanna Drive My Car,SUN,SUN$' ;43,35 sun1 db 'SUN' swc ...
- CentOS7-MySQL8安装-使用yum库安装
# Enable to use MySQL 5.5 [mysql55-community] name=MySQL 5.5 Community Server baseurl/$basearch/ ena ...
- 设置DataTable行属性
dt.Columns["ColumnName"].DataType=Type.GetType("System.bool");
- Redis的分布式锁
一.锁的作用 当多线程执行某一业务时(特别是对数据的更新.新增)等操作,可能就会出现多个线程对同一条数据进行修改.其最终的结果一定与你期望的结果“不太一样”,这就与需要一把锁来控制线程排排队了 - j ...
- [软件工程基础]2017.11.04 第八次 Scrum 会议
具体事项 项目交接燃尽图 每人工作内容 成员 已完成的工作 计划完成的工作 工作中遇到的困难 游心 #10 搭建可用的开发测试环境:#9 阅读分析 PhyLab 后端代码与文档:#8 掌握 Larav ...
- P1201 [USACO1.1]贪婪的送礼者Greedy Gift Givers
题目描述 对于一群(NP个)要互送礼物的朋友,GY要确定每个人送出的钱比收到的多多少.在这一个问题中,每个人都准备了一些钱来送礼物,而这些钱将会被平均分给那些将收到他的礼物的人.然而,在任何一群朋友中 ...
- javaScript面向对像
1.创建对象 <script type="text/javascript"> function Flower(name,addre) { this.name=name; ...
- mysql查询问题
需求:根据选择不同的分类id,查找到同时属于选中的分类的文章id sql语句: select result,GROUP_CONCAT(category_id) from (select categor ...
- git 设置了ssh key 还是需要输入账户和密码
参考这篇文章https://blog.csdn.net/shahuhu000/article/details/86625987 git remote remove origingit remote a ...
- Monkey安装和使用介绍
安装步骤1)安装sdk环境在系统环境变量中配置 ANDROID_HOMED:\sdk PATH%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools;%A ...