记录一下sudo: /etc/sudoers is owned by uid 1000, should be 0的解决代码

bug

sudo: /etc/sudoers is owned by uid 1000, should be 0
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin

解决

$ su - root
$ chown root:root /etc/sudoers
$ chmod 440 /etc/sudoers
$ chown -R root:root /etc/sudoers.d
$ chmod 755 /etc/sudoers.d
$ chmod 440 /etc/sudoers.d/*

你可能感兴趣的:(开发点滴,linux)