Linux   发布时间:2022-03-31  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了[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.切换到超级用户:$

当在终端执行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!”保存并退出

注:这个文件是只读的,不加“!”保存会失败。

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

大佬总结

以上是大佬教程为你收集整理的[RedHat]“is not in the sudoers file”解决方法全部内容,希望文章能够帮你解决[RedHat]“is not in the sudoers file”解决方法所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签: