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安装软件方面的特点. ...
随机推荐
- 构建使用SQL服务器的ASP.net Core2.0 API
web api的教程非常少,使用 core2.0的更少,微软提供了一个aspnet core2的教程,也提供了EF core中访问SQL服务器的教程,参考这些教程可以做出使用sql server的as ...
- adb server version (39) doesn't match this client (40); killing...
在启动RN项目的时候也报错,上面的错误是在adb的环境变量中的位置和android studio的sdk不是一个位置.adb是在sdk中的,所以他们应该是一致的位置 android studio的sd ...
- 可以提升3倍开发效率的 Intellij IDEA快捷键大全汇总(2019)
整理了一下IDEA的常用快捷键,可以打印出来或者弄成图片设置为桌面,为广大的程序员们节省更多的时间去谈恋爱. 常用快捷键1 Ctrl+Shift + Enter,语句完成 “!”,否定完成,输入表达式 ...
- hdu 6319 Problem A. Ascending Rating (2018 Multi-University Training Contest 3)
#include <stdio.h> #include <iostream> #include <cstdlib> #include <cmath> # ...
- 基于.net core微服务(Consul、Ocelot、Docker、App.Metrics+InfluxDB+Grafana、Exceptionless、数据一致性、Jenkins)
1.微服务简介 一种架构模式,提倡将单一应用程序划分成一组小的服务,服务之间互相协调.互相配合,为用户提供最终价值.每个服务运行在其独立的进程中,服务与服务间采用轻量级的通信机制互相沟通(RESTfu ...
- centos下gitlab的简单安装配置
一.安装前配置yum源 #wget https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh #s ...
- Nginx upstream负载均衡配置
1.在http节点下添加 upstream test { server 127.0.0.1:16010; server 127.0.0.1:16011; } 2.把server 节点下 ...
- android开发学习 ------- 仿QQ侧滑效果的实现
需要做一个仿QQ侧滑删除的一个效果: 一开始是毫无头绪,百度找思路,找到 https://blog.csdn.net/xiaxiazaizai01/article/details/53036994 ...
- 精通AngularJS(三)深入scope,继承结构,事件系统和生命周期
深入探讨 Scope 作用域 每一个 $scope 都是类 Scope 的一个实例.类 Scope 拥有可以控制 scope 生命周期的方法,提供事件传播的能力,并支持模板渲染. 作用域的层次结构 让 ...
- Android 如何通过Retrofit提交Json格式数据
本文将介绍如何通过retrofit库post一串json格式的数据.首先post的json数据格式如下: { "Id": "string", "Dev ...