[Ubuntu] Ordinary users modify the /etc/sudoers file permissions to cause problems

       Things have to start from a low hand. I just installed an Ubuntu system on my computer. It is very fresh. I want to try some operations I haven't tried. As a "senior" Linux system "player", I was negligent. The following command was executed without opening the root user terminal, so I made a mistake...

       Let's take a look at what I did. I am a normal user and modified the permissions of the /etc/sudoers file, and then the problem appears in the following figure:

       Then when you execute any sudo, this problem will be reported:

sudo: /etc/sudoers 可被任何人写
sudo: 没有找到有效的 sudoers 资源,退出
sudo: 无法初始化策略插件

       Don't panic, you can use the following command to change it back, simple and practical:

pkexec chmod 0440 /etc/sudoers

       Fortunately, there are no dangers, there are really some things that can't be tried easily... Almost shed tears of regret...

 

Guess you like

Origin blog.csdn.net/gdkyxy2013/article/details/108406135