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.
Solution
Use pkexec
instead sudo
when accessing the file.
“pkexec
allows an authorized user to execute PROGRAM as another user.”
For example, use:
pkexec visudo -f /etc/sudoers
instead of:
sudo visudo -f /etc/sudoers
Same goes for visudo -f /etc/sudoers.d/some_file
.
References
Did this solve your issue?
THIS WORKED FOR ME. HELP OTHERS BY VOTING HOW IT WORKED FOR YOU.
RIGHT NOW THIS HAS HELPED 0% WEBSITE VISITORS.
TOTAL VOTES: 0
RIGHT NOW THIS HAS HELPED 0% WEBSITE VISITORS.
TOTAL VOTES: 0