What's the difference between `#include` and `@include` in `/etc/sudoers`
I'm updating to Ubuntu 21.04 and apt
wants to swap out my sudoers
file with one where #include
is replaced by @include
. Is the old syntax deprecated? It's not something I seem to be able to google.
Solution 1:
Expanding on @steeldriver's comment, which provides the answer.
The commit comment states the reason for the new directive is to avoid confusion because #
is also used for comments.
Add support for @include and @includedir These are less confusing than #include and #includedir when the hash character is also the comment character.
The latest man page indicates both directives are accepted, but the old style is supported for backwards compatibility. I infer the new style is preferred. There is no indication the old style will stop being supported.
It is possible to include other sudoers files from within the sudoers file currently being parsed using the @include and @includedir directives. For compatibility with sudo versions prior to 1.9.1, #include and #includedir are also accepted.