CompTIA Study Materials
AWS Study Materials
AWS Certified Developer Associate AWS Certified Developer Associate
AWS Certified Developer Associate DVA-C02
AWS Certified Solutions Architect Associate AWS Certified Solutions Architect Associate
AWS Certified Solutions Architect Associate SAA-C03
AWS Cloud Practitioner AWS Cloud Practitioner
AWS Cloud Practitioner CLF-C02
Microsoft Study Materials
Microsoft Azure Fundamentals Microsoft Azure Fundamentals
Microsoft Azure Fundamentals AZ-900

Free CompTIA Linux+ XK0-005 Practice Question

An administrator wishes to grant a user, john, the ability to restart the httpd service without providing a password. Which line should be added to the /etc/sudoers file to accomplish this?

  • john ALL=(ALL) NOPASSWD: ALL

  • john ALL=(ALL) NOPASSWD: systemctl restart httpd

  • john ALL=(ALL) /bin/systemctl restart httpd

  • john ALL=(ALL) NOPASSWD: /bin/systemctl restart httpd

This question is for objective:
Security
Your Score:
Security
System Management
Scripting, Containers, and Automation
Troubleshooting
SAVE $45