Security

A junior administrator needs to restart the nginx service and view its logs on a production Linux server. The administrator currently logs in directly as root over SSH. Which change BEST applies least privilege while still allowing these tasks?

Show the answer

Correct answerB. Create a personal account and add a sudoers rule that permits only systemctl restart nginx and reading the nginx logs

A named account with a narrowly scoped sudoers rule grants only the needed commands and logs each use. Full wheel membership allows any command as root, which exceeds the need and defeats least privilege.