Linux下is not in the sudoers file解决方法解决记录

https://www.cnblogs.com/lazzyk/p/6264012.html
参照文章
最近在学习linux,在某个用户(xxx)下使用sudo的时候,提示以下错误:xxx is not in the sudoers file. This incident will be reported。

百度了下,究其原因是用户没有加入到sudo的配置文件里。

 解决方法如下:

1、切换到root用户,运行visudo命令

2、找到root ALL=(ALL) ALL,在下面添加一行 xxx ALL=(ALL) ALL 其中xxx是要加入的用户名称

但这篇文章没有说怎么保存~~~
其实就是VI的保存方式

猜你喜欢

转载自blog.csdn.net/weixin_42909272/article/details/83388306