sudo: /etc/sudoers is world writable sudo: no valid sudoers sources found, q…

Today, I operate the/etc/sudoers file, because it is read-only, so sudo Chmod 777/etc/sudoers. As a result, this file can be modified, but the sudo of all users cannot be used

The reason is that in Linux, the file must have read-only permission. If you know the root password, you can modify it in the root account. Chmod 0440/etc/sudoers is OK. If you don’t know the root password, the following method is recommended

1、 Restart the system, press and hold the shift key until the gun grub interface appears (below)

Select advanced options and press enter

Then move the selection to recovery mode, then press e instead of enter, because we want to enter writable mode

Then use the arrow keys to find the Linux line and change RO to RW

Then press Ctrl + X to enter the interface below, select root and press enter to enter the root user’s terminal

Enter the command to modify the permissions of sudoers:
Chmod 0440/etc/sudoers & lt; Enter & gt

Enter reboot again, and it’s done

Similar Posts: