[转]Linux下is not in the sudoers file解决方法
来源: http://jingyan.baidu.com/article/2a1383284bb3e8074a134f2d.html
当我们使用sudo命令切换用户的时候可能会遇到提示以下错误:xxx is not in the sudoers file. This incident will be reported,xxx是你当前的用户名,究其原因是用户没有加入到sudo的配置文件里

工具/原料
vi/vim
方法/步骤
- 1
切换到root用户,运行visudo命令
- 2
在打开的配置文件中,找到root ALL=(ALL) ALL,在下面添加一行
xxx ALL=(ALL) ALL 其中xxx是你要加入的用户名称
- 3
输入:wq保存并退出配置文件,再次使用sudo命令就不会有上面的提示了。
END
注意事项
编辑配置文件的时候最好使用visudo命令,否则可能会出现其他错误
[转]Linux下is not in the sudoers file解决方法的更多相关文章
- Linux下is not in the sudoers file解决方法
最近在学习linux,在某个用户(xxx)下使用sudo的时候,提示以下错误:xxx is not in the sudoers file. This incident will be reporte ...
- 关于Ubuntu下is not in the sudoers file解决方法
当我在postgres用户下去执行sudo vim demo.sql需要用管理员权限运行时,并且输入本用户的密码,但是输入之后提示如下: postgers is not in the sudoers ...
- Linux中“is not in the sudoers file”解决方法
当在终端执行sudo命令时,系统提示"hadoop is not in the sudoers file": 其实就是没有权限进行sudo,解决方法如下(这里假设用户名是cuser ...
- Linux下登录Oracle命令行时删除键^H解决方法
Linux下登录Oracle命令行时删除键^H解决方法 在linux服务器下登录oracle的控制台,如果输入错误,想用删除键删除时却不能删除,输出的是^H的字符. 方法 用如下的命令可以使删除键生效 ...
- Linux下is not in the sudoers file(转)
用sudo时提示"xxx is not in the sudoers file. This incident will be reported.其中XXX是你的用户名,也就是你的用户名没有权 ...
- RedHat Linux下普通用户无法使用sudo命令的解决方法
Ref:http://blog.sina.com.cn/s/blog_4aa35ca101012qb6.html 装完linux系统,发现普通用户无法使用sudo 命令, 提示:User1(普通用户) ...
- linux下误删mysql的root用户,解决方法
开始对liunx界面不熟悉,可能由于不小心,把root误删了,怎么办? 1. # killall mysqld 干掉所有mysql进程 2. # mysqld_safe --skip-grant ...
- Error: Linux下 mysql.sock文件丢失被删除解决方法
在默认情况下,Mysql安装以后会在/tmp目录下生成一个mysql.sock文件,如该文件丢失则Mysql将不能够正常启动,解决方法:使用mysqld_safe 启动即可解决: #basedir:m ...
- Linux下DM无法显示建模界面的解决方法
方法来源: http://www.linuxhospital.com/read/unable-to-resolve-function-glxqueryextension-in-hyperview.ht ...
随机推荐
- bootstrap例子
<!DOCTYPE html> <html> <head> <title>Bootstrap 101 Template</title> &l ...
- <杂记>Android Studio 3.0-3.1 汉化包 (转载)
JetBrains 系列软件汉化包 关键字: Android Studio 3.0-3.1 汉化包 CLion 2018.1 汉化包 GoLand 2017.3.2-2018.1 汉化包 Intell ...
- HNU 2015暑期新队员训练赛2 H Blanket
把每个 bi *x + ri ( 0 <= ri <= ai)标记, 输出被标记 0 – N 次的个数 #include<iostream> #include<cstdi ...
- [PHP]session的一些要点
一.session_start([array $options=array()]) 1.只能在输出http头前启动此函数,因为如果需要改写sessid的键和值,需要在http报文头发出前就开始定义了: ...
- SQL语句常用约束类型
常用五类约束: not null:非空约束,指定某列不为空 unique: 唯一约束,指定某列和几列组合的数据不能重复 primary key:主键约束,指定某列的数据不能重复.唯一 forei ...
- JS 操作数组对象
我们在操作数组时,加入数组中是以对象的形式存在,例如: 那么我们会涉及到去重复,去掉为0的数组中的对象,js代码如下: function getItemList(gid, totalMoney, ad ...
- 4)协程一(yeild)
一:什么协程 协程: coroutine/coro - 轻量级线程(一个线程) - 调度由用户控制 - 有独立的寄存器上下文和栈 - 切换时保存状态,回来时恢复 二:协程和多线程比较 协程: coro ...
- linux显示完整目录
vim ~/.bashrc ##添加以下信息 export PS1='[\u@\h `pwd`]$ ' 然后保存退出 source ~/.bashrc 或者关机重新启动即可
- Android:四大架构的优缺点,你真的了解吗?
声明|转载于作者:KunMinX原文链接:https://www.jianshu.com/p/9ef813d5c1af 前言 前不久刚结束对 20 模块项目的第 3 轮重构,一路见证 MVC.MVP. ...
- Centos 7.3下 Linux For SQL Server安装及配置介绍
Centos 7.3下 Linux For SQL Server安装及配置介绍 高文龙关注13人评论2828人阅读2017-03-05 21:46:21 Centos 7.3下Linux For SQ ...