Sunday, October 27, 2013

How to recover sudo if /etc/sudoers file is invalid?

If /etc/sudoers file is damaged/changed so that sudo command cannot be invoked, the best method of saving the world is to call utility 'pkexec':

   pkexec command_to_run

For example, to edit the /etc/sudoers file is simply

   pkexec visudo

No comments: