is not in the 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、输入“:w”(保存文件)
6、输入“:q”(退出)
这样就把自己加入了sudo组,可以使用sudo命令了。
is not in the sudoers file 解决(转)的更多相关文章
- 【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 ...
- Linux中“is not in the sudoers file”解决方法
当在终端执行sudo命令时,系统提示"hadoop is not in the sudoers file": 其实就是没有权限进行sudo,解决方法如下(这里假设用户名是cuser ...
- Linux sudo 错误:XXX 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 ...
- [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 ...
- [转]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是你的用户名,也就是你的用户名没有权 ...
- Ubuntu技巧之 is not in the sudoers file解决方法
转自:http://www.linuxidc.com/Linux/2010-12/30386.htm 1)进入到root用户下. 2)添加文件的写权限.也就是输入命令"chmod u+w / ...
随机推荐
- python 使用__slots__
正常情况下,当我们定义了一个class,创建了一个class的实例后,我们可以给该实例绑定任何属性和方法,这就是动态语言的灵活性.先定义class: >>> class Studen ...
- 如何关闭log4j中配置的spring或者hibernate的日志信息
通常在建立一个web项目的时候,我们通常需要为其配置日志,以便了解启动过程中发生了什么,如果启动过程中发生了错误,则可以很方便的查看错误的信息,但是在项目部署到服务器上时,打印日志信息,需要耗费大量的 ...
- Android 上拉加载更多功能
前几天看了github上面的例子,参照它的实现,自己又稍微改了一点,往项目里面增加了一个上拉加载更多功能.具体的实现如下: 首先要重写ListView: import android.content. ...
- POJ 1273 || HDU 1532 Drainage Ditches (最大流模型)
Drainage DitchesHal Burch Time Limit 1000 ms Memory Limit 65536 kb description Every time it rains o ...
- COM编程VS实践
目录 1. 2. 2.1. 2.2. 2.3. 3. 3.1. 3.2. 3.3. 1.COM实践简介 因需要对Office系列进行程序操作,特研究了一下COM相关的编程. 个人体会:COM面向接口编 ...
- mac os升级为 Yosemite 10.10 后不能创建javaproject
出现这样的情况可能是因为mac系统升级导致JAVA的安装路径发生改变(Xcode升级后也出现模拟器位置改变的情况,不要奇怪) 之前安装的eclipse就自然找不到SDK的路径了,所以会捆绑失败 接下来 ...
- 17周 oj 比較大小 类模板
/*声明一个类模板,利用它分别实现两个整数. 浮点数和字符的比較,求出大数和小数. 说明:在类模板外定义各成员函数. 输入两个整数.两个浮点数和两个字符 从大到小输出两个整数.两个浮点数和两个字符 * ...
- Android 读取SIM卡参数
package com.water.activity; import java.util.List; import android.app.Activity; import android.os.Bu ...
- 跟我学solr---吐槽一下,我的文章被抄袭啦
今天闲来无事,就在在百度上搜了下面"跟我学solr",看看这几周来自己的努力成果怎么样,不搜还好,搜了就图学了.被原封不动地抄袭了!并且抄袭的文章还在百度排名第一,我自己的却被排到 ...
- hellogcc -100GDB技巧
https://github.com/hellogcc/100-gdb-tips/blob/master/README.md