
问题原因:yun用户没有sudo权限
解决办法:
1. 先sudo到root账户

2. 添加sudo文件的写权限(u表示为当前用户添加某种权限)

3. 查看文件属性
lsattr /etc/sudoers

可以看到文件添加了禁止修改的属性“-i”
4. 删除sudoers的-i属性
chattr -i /etc/sudoers

5. 执行chmod u+w /etc/sudoers
6. 编辑sudoers
vim /etc/sudoers
7. 按下图进行添加

8. 提前将sudoers权限去掉可写

9. 给sudoers 添加不可编辑属性i

如果本文章为你解决问题提供了帮助,请不要吝啬为以后的分享热情添一把柴
网友评论