2020-08-27 Linux中“is not in the sudoers file”解决方法

一、问题:我使用 sudo adduser testuser ,添加testuser完成后,使用su testuser ,命令切到testuser 用户下,然后想切会root 超级用户下,就提示,testuser is not in the sudoers file, this incident will be reported .  具体过程如下:

not in the sudoers file

二、解决办法

在打开一个terminal 终端(用建立虚拟机时候的用户名),然后切到root用户,再编译/etc/sudoers ,最后添加一行,testuser  ALL=(ALL:ALL)  ALL ,保存文件

解决 not in the sudoers file
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。