Sudo: parse error in / etc / sudoers near line 24

From: https://www.cnblogs.com/starsea/p/4926658.html

Ubuntu USES viM for adding user permissions

/etc/sudoers

File editing, save and exit, sudo SU and other commands have been reported as follows:

sudo: parse error in /etc/sudoers near line 24
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin

The reason is that it is wrong to use Vim to modify the file. For example, Google says you should use visudo to edit sudoers.
If something goes wrong, the following solution is executed:

pkexec visudo

Enter the file edit, for just modify the wrong place, directly modify, save exit, restore normal


Read More: