January 2018
Intermediate to advanced
376 pages
8h 45m
English
In the following line, (ALL) means that Sylvester can run the systemctl commands as any user:
sylvester ALL=(ALL) /usr/bin/systemctl status sshd, /usr/bin/systemctl restart sshd
This effectively gives Sylvester root privileges for these commands because the root user is definitely any user. You could, if desired, change that (ALL) to (root) in order to specify that Sylvester can only run these commands as the root user:
sylvester ALL=(root) /usr/bin/systemctl status sshd, /usr/bin/systemctl restart sshd
Okay, there's probably not much point in that because nothing changes. Sylvester had root privileges for these systemctl commands before, and he still has them now. But, there are more practical uses for this ...