美文网首页
Linux: 解决[用户名] is not in the sud

Linux: 解决[用户名] is not in the sud

作者: wzNote | 来源:发表于2020-04-19 21:32 被阅读0次

1.切换到root用户

sudo -i

2.添加文件读写权限

chmod u+w /etc/sudoers

3.打开文件

vim /etc/sudoers

注:如果没有vim,请通过apt-get install vim安装。

4.找到root ALL=(ALL) ALL并在此行下方添加:

[用户名] ALL=(ALL) ALL

5.删除文件读写命令

chmod u-w /etc/sudoers

相关文章

网友评论

      本文标题:Linux: 解决[用户名] is not in the sud

      本文链接:https://www.haomeiwen.com/subject/hkoibhtx.html