Hacker News new | ask | show | jobs
by Symbiote 2109 days ago
You should use "visudo", which opens the file in the default editor, then validates it before saving.
2 comments

But make sure to change the default editor to something sane first. (* ducks *)

:q!dammitwtf

+1 to that!

I like nano, and I'm not ashamed to admit it.

if you edit outside of visudo, you can run visudo -cf <filename>.

example: visudo -cf /etc/sudoers visudoe -cf /etc/sudoers.d/extra