Running a fresh install of Ubuntu server 16.04.1, I tried to add a file in
/etc/sudoers.d/ to give one user root privileges for a certain command.
I added the file
/etc/sudoers.d/servicetest with the following content:
servicetest ALL = (root) NOPASSWD: /bin/systemctl status *
/etc/sudoers is left untouched. It contains
#includedir /etc/sudoers.d as the last line.
This setup is unfortunately not working, when executing an appropriate command with sudo as the user
servicetest, I am still asked for the password. However, if I move the content of the file
/etc/sudoers.d/servicetest to the end of
/etc/sudoers, everything is working as expected.
What could be the cause of this issue? How can I get files in