Case: After creating a file in /etc/sudoers.d/ and adding command aliases and a user privilege specification, the file became inaccessible and sudo-ing no longer worked on Ubuntu.
sudo when accessing the file.
pkexec allows an authorized user to execute PROGRAM as another user.”
For example, use:
pkexec visudo -f /etc/sudoers
sudo visudo -f /etc/sudoers
Same goes for
visudo -f /etc/sudoers.d/some_file.