2020-08-27 Linux中“is not in the sudoers file”解决方法
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了2020-08-27 Linux中“is not in the sudoers file”解决方法相关的知识,希望对你有一定的参考价值。
参考技术A 一、问题:我使用 sudo adduser testuser ,添加testuser完成后,使用su testuser ,命令切到testuser 用户下,然后想切会root 超级用户下,就提示,testuser is not in the sudoers file, this incident will be reported . 具体过程如下:二、解决办法
在打开一个terminal 终端(用建立虚拟机时候的用户名),然后切到root用户,再编译/etc/sudoers ,最后添加一行,testuser ALL=(ALL:ALL) ALL ,保存文件
Linux中“is not in the sudoers file”解决方法
当在终端执行sudo命令时,系统提示“kongbursi is not in the sudoers file”:
其实就是没有权限进行sudo,解决方法如下(用户名是kongbursi):
1.切换到超级用户:$ su
2.打开/etc/sudoers文件:$vim /etc/sudoers
3.修改文件内容:
找到“root ALL=(ALL) ALL”一行,在下面插入新的一行,内容是“kongbursi ALL=(ALL) ALL”,然后在vim键入命令“:wq!”保存并退出。
注:这个文件是只读的,不加“!”保存会失败。
4.退出超级用户:$ exit
以上是关于2020-08-27 Linux中“is not in the sudoers file”解决方法的主要内容,如果未能解决你的问题,请参考以下文章
linux中php项目无法发送邮件:PEAR mail package is not installed
Linux中“is not in the sudoers file”解决方法
Linux报错:tar: Error Is Not Recoverable: Exiting Now
Linux下is not in the sudoers file解决方法