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?

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?

A. accounting localhost=/opt/acc/report

B. accounting ALL=/opt/acc/report

C. %accounting ALL=(ALL) NOPASSWD: /opt/acc/report

D. accounting /opt/acc/report= (ALL) NOPASSWD: ALL

Answer: C

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.

The other answers are incorrect for the following reasons:

A. accounting localhost=/opt/acc/report

This answer only allows the accounting user to run the command on the localhost, not on any host.

This answer also requires the accounting user to enter their password, which is not specified in the question.

B. accounting ALL=/opt/acc/report

This answer only allows the accounting user to run the command as themselves, not as root.

This answer also requires the accounting user to enter their password, which is not specified in the question.

D. accounting /opt/acc/report= (ALL) NOPASSWD: ALL

This answer has an invalid syntax, as there should be no space between the equal sign and the parentheses.

This answer also grants too much privilege to the accounting user, as it allows them to run any command as any user without a password.

Latest XK0-005 Dumps Valid Version with 136 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments