[RedHat]“is not in the sudoers file”解决方法

作者:佚名 上传时间:2019-06-01 版权申诉

当在终端执行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
3.修改文件内容:
找到“root    ALL=(ALL)       ALL”一行,在下面插入新的一行,
内容是“luckcheng ALL=(ALL)       ALL”,然后在vi键入命令“wq!”保存并退出。

[RedHat]“is not in the sudoers file”解决方法
注:这个文件是只读的,不加“!”保存会失败。

4.退出超级用户:$ exit
5.可以尽情使用sudo了。

免责申明:文章和图片全部来源于公开网络,如有侵权,请通知删除 server@dude6.com

用户评论
相关推荐
[RedHat]“is not in the sudoers file解决方法
当在终端执行sudo命令时,系统提示“luckchengis not in the sudoers file”: $ sudo ls Password
Linux中“is not in the sudoers file解决方法
最近虚拟机装了个RedHat Enterprise Server 5,用惯了Ubuntu,觉得不太适应。 当在终端执行sudo命令时,系统提示“cuser is not
Ubuntu技巧之"xxx is not in the sudoers file"解决方法
原文地址:http://www.linuxidc.com/Linux/2010-12/30386.htm 用sudo时提示"xxx is not in the sudoe
xxx is not in the sudoers file.This incident will be reported.的解决方法
本文转自: http://www.cnblogs.com/zox2011/archive/2013/05/28/3103824.html
xxx is not in the sudoers file.This incident will be reported.的解决方法
本文转自: http://www.cnblogs.com/zox2011/archive/2013/05/28/3103824.html
redhat File_System
redhat部属文件系统redhatFile_System
PDF
0B
2019-06-21 23:14
Linux下is not in the sudoers file(转)
用sudo时提示"xxx is not in the sudoers file. This incident will be reported.其中XXX是你的用户名,也就是你的用户
ubuntu系统中有关sudoers文件访问错误的解决方法
此文档详细介绍在ubuntu系统下由于某种操作(修改了/usr/目录下某些文件的权限,修改了用户的名字等)导致sudoers文件不可用时的解决方法。非常有用。
ZIP
0B
2019-02-18 16:41
树莓派sudoers文件
树莓派使用的sudoers文件,当调用管理员权限出问题时,很有可能是该文件出现了问题,一个可行的方法就是使用另一个Linux系统替换该文件。
其他
669B
2021-02-22 05:35
Ansible ansible sudoers.zip
Ansible-ansible-sudoers.zip,控制默认/etc/sudoers文件和包含的文件/目录的配置。,ansible是一个简单而强大的自动化引擎。它用于帮助配置管理、应用程序部署和任
ZIP
10KB
2020-08-16 09:29