Visudo: #includedir sudoers.d
WTF. Today I fell for this sudo madness and uncommented this "comment" in /etc/sudoers:
#includedir /etc/sudoers.dwhich gives a
visudo: >>> /etc/sudoers: syntax error near line 28 <<<Let's check the "sudoers" manpage again: full of EBNF notations! But nothing in the EBNF about comments being commands. At least under Other special characters and reserved words one finds
The pound sign ('#') is used to indicate a comment (unless it is part of a #include directive or unless it occurs in the context of a user name and is followed by one or more digits, in which case it is treated as a uid). Both the comment character and any text after it, up to the end of the line, are ignored.Cannot this be done in a better way?