nerdexam
CompTIA

XK0-005 · Question #1608

A Linux administrator is creating a new sudo profile for the accounting user. Which of the following should be added by the administrator to the sudo configuration file so that the accounting user…

The correct answer is C. %accounting ALL=(ALL) NOPASSWD: /opt/acc/report. This answer allows the accounting user to run the /opt/acc/report command as root on any host without entering a password. The % sign indicates that accounting is a group name, not a user name. The ALL keyword means any host, any user, and any command, depending on the context…

System Management

Question

A Linux administrator is creating a new sudo profile for the accounting user. Which of the following should be added by the administrator to the sudo configuration file so that the accounting user can run /opt/acc/report as root?

Options

  • Aaccounting localhost=/opt/acc/report
  • Baccounting ALL=/opt/acc/report
  • C%accounting ALL=(ALL) NOPASSWD: /opt/acc/report
  • Daccounting /opt/acc/report=(ALL) NOPASSWD: ALL

How the community answered

(51 responses)
  • A
    2% (1)
  • B
    6% (3)
  • C
    82% (42)
  • D
    10% (5)

Explanation

This answer allows the accounting user to run the /opt/acc/report command as root on any host without entering a password. The % sign indicates that accounting is a group name, not a user name. The ALL keyword means any host, any user, and any command, depending on the context. The NOPASSWD tag overrides the default behavior of sudo, which is to ask for the user's password.

Topics

#sudo#sudoers#Linux permissions#User management

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice