解决ubuntu里面的sudo: /etc/sudoers is mode 0640, should be 0440

问题原因:

修改了sudo文件, 导致sudo权限在0640,或者sudo的配置格式错误。因此,要把sudo权限更改回0440。

所以呢,修改sudo,请用命令visudo。

http://blog.csdn.net/chz870128/article/details/6263513

基本上出现标题里面的错误,有两种解决方案:

1.进入recovery mode,设置sudo权限。http://hi.baidu.com/shirdrn/blog/item/3b2d17cabc01118cc8176862.html

2.不用,进入到回复模式。切换到root账户,或者启用Ubuntu的恢复模式,获得管理员权限.

chown -R root:root /etc/sudoers.d
chmod u=rwx,g=rx,o=rx /etc/sudoers.d/
chmod u=r,g=r,o= /etc/sudoers.d/*
将sudoers.d文件夹的权限设置成root用户和root组,
root组只有执行的权限,只有root用户有写入的权限。
 

然后执行chmod 0440 /etc/sudoers

http://www.magentonotes.com/ubuntu-file-sudo.html
 

合乎自然而生生不息。。。
原文地址:https://www.cnblogs.com/samwu/p/2381347.html