xxx is not in sudoers file 解决(转)
解决方案:
首需要切换到root身份
$su -
(注意有- ,这和su是不同的,在用命令"su"的时候只是切换到root,但没有把root的环境变量传过去,还是当前用户的环境变量,用"su -"命令将环境变量也一起带过去,就象和root登录一样)
然后
$visudo //切记,此处没有vi和sudo之间没有空格
1、移动光标,到最后一行
2、按a,进入append模式
3、输入
your_user_name ALL=(ALL) ALL
4、按Esc
5、输入“:wq”(保存文件)
这样就把自己加入了sudo组,可以使用sudo命令了。
如图:

xxx is not in sudoers file 解决(转)的更多相关文章
- Linux sudo 错误:XXX is not in the sudoers file 解决办法
最近在学习linux,在某个用户(xxx)下使用sudo的时候,提示以下错误:xxx is not in the sudoers file. This incident will be reporte ...
- 【linux】xx is not in the sudoers file 解决办法
原帖地址:http://blog.sina.com.cn/s/blog_4ef045ab0100j59t.html 我用的是redhat5.4,在一般用户下执行sudo命令提示llhtiger is ...
- 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下is not in the sudoers file解决方法
来源: http://jingyan.baidu.com/article/2a1383284bb3e8074a134f2d.html 当我们使用sudo命令切换用户的时候可能会遇到提示以下错误:xxx ...
- is not in the sudoers file解决方法
用sudo时提示"xxx is not in the sudoers file. This incident will be reported.其中XXX是你的用户名,也就是你的用户名没有权 ...
- [RedHat]“is not in the sudoers file”解决方法
当在终端执行sudo命令时,系统提示“luckchengis not in the sudoers file”: $ sudo ls Password: luckcheng is not in the ...
- 用户不在sudoers文件中怎么办,ziheng is not in the sudoers file解决方法
sudo是linux系统中,用来执行需要权限命令,但是一些朋友使用sudo时,出现下面的错误“ziheng is not in the sudoers file. This incident will ...
随机推荐
- 面向对象【day08】:反射的最佳实践(三)
本节内容 1.伪造web框架的路由系统 2.反射函数 3.扩展导入模块 4.企业最佳实践 一.伪造web框架的路由系统 commons.py #!/usr/bin/env python # -*- c ...
- 修改placeholder样式
/* 修改placeholder样式,兼容性 新版火狐,IE10+ */ .login-input::-webkit-input-placeholder { color: #000; font-siz ...
- 日志的使用-log4j
1,首先添加对log4j-core-2.6.2.jar,log4j-api-2.6.2.jar的引用. https://files.cnblogs.com/files/renjing/log4j.zi ...
- 串行动画组QSequentialAnimationGroup
按顺序执行动画 该类就是用来按照动画添加顺序来执行动画的.我们只用实例化该类,然后通过调用addAnimation()或者insertAnimation()方法把各个动画添加进去就可以了 import ...
- JavaScript之JS单线程|事件循环|事件队列|执行栈
本博文基于知乎"JavaScript作用域问题?"一问,而引起了对JavaScript事件循环和单线程等概念与实践上的研究.深入理解. 一.概念 0.关键词:JavaScript单 ...
- luogu P3674 小清新人渣的本愿
传送门 毒瘤lxl 本质是莫队,关键是怎么处理询问 这里需要开两个bitset(记为\(b1,b2\)),分别存\(x\)和\(n-x\)是否出现 对于询问1,即\(x-y=z\),由于\(y=x-z ...
- HashMap原理分析(JDK1.7.x之前)
HashMap 实现Map.Cloneable.Serializable接口,继承AbstractMap基类. HashMap map = new HashMap<String,String&g ...
- split('\r\n')
'\r'是回车,'\n'是换行,前者使光标到行首,后者使光标下移一格.通常用的Enter是两个加起来. 实际我的脚本读取FTP的列表,如果用的split("\r\n"),可以获得正 ...
- python(七) Python中单下划线和双下划线
Python中单下划线和双下划线: 一.分类 (1).以单下划线开头,表示这是一个保护成员,只有类对象和子类对象自己能访问到这些变量. 以单下划线开头的变量和函数被默认是内部函数,使用from mod ...
- mysql 原理~ 乐观锁和悲观锁
一 简介:今天咱们来聊聊悲观锁和乐观锁 二 悲观锁 1 定义 在关系数据库管理系统里,悲观并发控制(又名“悲观锁”,Pessimistic Concurrency Control,缩写“PCC” ...