[RedHat]“is not in the sudoers file”解决方法
当在终端执行sudo命令时,系统提示“luckchengis not in the sudoers file”:
$ sudo ls
Password:
luckcheng is not in the sudoers file. This incident will be reported.
其实就是没有权限进行sudo,解决方法如下(这里假设用户名是luckcheng):
1.切换到超级用户:$ su
2.打开/etc/sudoers文件:$vi /etc/sudoers
.修改文件内容: 找到“root ALL=(ALL) ALL”一行,在下面插入新的一行,
内容是“luckcheng ALL=(ALL) ALL”,然后在vi键入命令“wq!”保存并退出。
注:这个文件是只读的,不加“!”保存会失败。
.退出超级用户:$ exit
.可以尽情使用sudo了。
[RedHat]“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 ...
- Linux中“is not in the sudoers file”解决方法
当在终端执行sudo命令时,系统提示"hadoop is not in the sudoers file": 其实就是没有权限进行sudo,解决方法如下(这里假设用户名是cuser ...
- 关于Ubuntu下is not in the sudoers file解决方法
当我在postgres用户下去执行sudo vim demo.sql需要用管理员权限运行时,并且输入本用户的密码,但是输入之后提示如下: postgers is not in the sudoers ...
- 用户不在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 / ...
- vss error reading from file 解决方法
vss error reading from file 解决方法 1 若服务器中存在 vss/data/backup目录,请将该目录删掉2 运行cmd cd.. cd C:\Program Files ...
- centos vsftpd 553 Could not create file解决方法
centos vsftpd 553 Could not create file解决方法 问题由于selinux引起的,问题解决办法: www.2cto.com 输入:getsebool - ...
随机推荐
- hdu 2187 悼念512汶川大地震遇难同胞——老人是真饿了(贪心)
新人题:n2的排序就可以过 #include <stdio.h> #include <stdlib.h> int main() { int c,n,i,j,o; ],b[],m ...
- vue.js事件传值之子组件传向父组件以及$emit的使用
在项目开发中,有时候会遇到一种需求比如是:在子组件中,通过一个事件,比如点击事件,去改变父组件中的某个值,下面来看看是怎么个流程 还是先截图目录结构 父组件为app.vue,components中的文 ...
- Office办公软件Excel使用整理
Office办公软件Excel使用整理 Excel默认打印预览于当前连接的打印机的纸张大小保持一致. Excel sheet不见了怎么办 -------------- 设置Excel第二页打印开始的位 ...
- Vue.js_devtools_5.1.0.zip【需要的可自行下载】
点击链接下载: Vue.js_devtools_5.1.0.zip
- Java改变引用数据类型的值
Java改变引用数据类型的值 在Java中,引用数据类型的数据传递的是值(地址)的拷贝 对于以下代码 class BirthDate { private int day; private int mo ...
- luogu P2158 [SDOI2008]仪仗队 (欧拉函数)
欧拉函数裸题 可惜我太久没做题忘了欧拉函数是什么了... 注意判断一下n = 1的情况就好了 #include <cstdio> using namespace std; ; typede ...
- 利用Master库spt_values表 连续数字
SELECT CONVERT ( ), dateadd(d, number, GETDATE()), ) AS every_time FROM master..spt_values n WHERE n ...
- Linux - mysql 异常: ERROR! MySQL is not running, but lock file (/var/lock/subsys/mysql) exists
问题描述 ERROR! MySQL is not running, but lock file (/var/lock/subsys/mysql) exists 解决方案 删除:/var/lock/su ...
- sql 按天及上午下午分组
),r.CTime,), then '下午' end as k, count(*) from Record as r left join Channel as c on r.ChannelId=c.I ...
- MAC MAMP集成环境安装 PHP 扩展
MAC MAMP集成环境安装 PHP扩展 开发环境中,对于需要维护很多 WEB 站点,以及可能会使用到很多不同的 PHP 版本,集成环境比较好用,在MAC 上 MAMP 集成环境是比较好用的,但是在安 ...