当我们使用sudo命令切换用户的时候可能会遇到提示以下错误:xxx is not in the sudoers file. This incident will be reported,xxx是你当前的用户名,究其原因是用户没有加入到sudo的配置文件
解决方法
su root 切换到root用户下
终端运行visudo命令
在打开的配置文件中,找到root ALL=(ALL) ALL,在下面添加一行
user ALL=(ALL) ALL 其中user是你要加入的用户名称
按ESC退出编辑状态
输入 :wq保存文件
相关文章
- linux 重启网卡报错 RTNETLINK answers: File exists”的解决方法
- XXXX is not in the sudoers file. This incident will be reported解决方法
- zookeeper的配置(Windows环境和Linux环境下)常见问题(zookeeper_server.pid: No such file or directory)解决
- Linux系统下Oracle执行SQL脚本后中文出现乱码解决方法
- linux下安装libcurl过程及开发遇到的问题"curl/:没有那个文件或目录"缺少头文件解决方法
- Linux下WPS提示字体缺失的解决方法
- ubuntu 64bit “arm-linux-gcc: No such file or directory”问题的解决方法
- Linux执行.sh文件,提示No such file or directory的问题的解决方法:
- linux下,matplotlib遇到的相关问题以及解决方法
- Linux下执行程序出现 Text file busy 时的解决办法