I was editing my /etc/sudoers file and saved it but it has a syntax error in there. Now I can't 'sudo vim /etc/sudoers' because sudo thinks the sudoers file is not valid.
How can I fix this?
|
feedback
|
|
Boot the system into single mode and then edit it. | |||||||||||
feedback
|
|
You should never edit your sudoers file directly. Use To recover from this situation, either boot into single-user mode and edit the file or boot off of a livecd and do the same. | |||||||
feedback
|
|
By the way, if you have the root password, just login with it and set it back the way it was. chmod 0440 /etc/sudoers This will avoid you from booting into single-user mode or worst, booting from a livecd. In my case I couldn't afford to bring the server down. | ||||
|
feedback
|