To add an additional option to the answers above, if the race condition is not a serious problem, then you can use the following command to avoid manually copying the modified file to /etc/sudoers
sudo EDITOR="cp /tmp/sudoers.new" visudo
This ensures that the new file is checked and installed correctly with the updated permissions.
Please note that if there is an error in the /tmp/sudoers.new file, then visudo will ask for user input, so it is recommended that you first check it with visudo -c -f /tmp/sudoers.new .
zelanix May 29 '13 at 17:16 2013-05-29 17:16
source share