第一句子网 - 唯美句子、句子迷、好句子大全
第一句子网 > Linux 普通用户使用 sudo 命令报 xxx is not in the sudoers file 问题解决

Linux 普通用户使用 sudo 命令报 xxx is not in the sudoers file 问题解决

时间:2020-10-06 19:16:12

相关推荐

Linux 普通用户使用 sudo 命令报 xxx is not in the sudoers file 问题解决

当我们使用sudo命令切换用户的时候可能会遇到提示以下错误:xxx is not in the sudoers file. This incident will be reported,xxx是你当前的用户名,究其原因是用户没有加入到sudo的配置文件里

切换到root用户,执行以下命令:

$ visudo

在打开的配置文件中,找到root ALL=(ALL) ALL,在下面添加一行

xxx ALL=(ALL) ALL 其中xxx是你要加入的用户名称

输入 :wq 保存并退出配置文件,再次使用sudo命令就不会有上面的提示了。

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。