Reputation: 7422
How to fix broken sudoers file in rhel6, it's not allowing me to get into sudo
[bash ~]$ sudo su
sudo: >>> /etc/sudoers: syntax error near line 109 <<<
sudo: >>> /etc/sudoers: syntax error near line 109 <<<
sudo: parse error in /etc/sudoers near line 109
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
I cannot edit this file as the permission is not there and this is virtual machine
Upvotes: 0
Views: 7888
Reputation: 106
I know answering to this question is too late but it might be helpful to someone in the future.
instead of opening with sudo on terminal type visudo
and edit the sudoers file.
Upvotes: 1