exam questions

Exam XK0-004 All Questions

View all questions & answers for the XK0-004 exam

Exam XK0-004 topic 1 question 181 discussion

Actual exam question from CompTIA's XK0-004
Question #: 181
Topic #: 1
[All XK0-004 Questions]

A junior systems administrator is tasked with providing the network_administrators group the ability to perform sudo without prompting for a password.
Which of the following steps should the administrator perform to accomplish this task? (Choose two.)

  • A. Use visudo to edit the /etc/sudoers file and add network_administrators to the ג€wheelג€ group
  • B. Use vi to edit the /etc/sudo file and add network_administrators to the ג€wheelג€ group
  • C. Provide all network_administrators with the ג€rootג€ account password
  • D. Add the network_administrators ALL=(ALL) NOPASSWD: ALL directive to the /etc/sudoers file
  • E. Add the network_administrators =(ALL) NOEXEC: ALL directive to the /etc/sudoers file
Show Suggested Answer Hide Answer
Suggested Answer: CD 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
sanspulp
Highly Voted 4 years, 4 months ago
I think it's A and D as the network_administrators group would need to be part of "wheel" to perform sudo tasks... C is not valid as you're trying to eliminate the need for the password in the first place!
upvoted 16 times
...
Dreydrey
Most Recent 3 years ago
people who are saying A, how do you add members to a group via visudo? I understand A and D are the only answers that make sense but am still to know how to add members to a group via that sudoers file
upvoted 2 times
RichardJRL
3 years ago
The relevant admins are already members of the 'network_administrators' group, you're not adding them to a group using visudo, you're adding their already established group to the file.
upvoted 1 times
...
luken7777
1 year, 9 months ago
visudo /etc/sudoers and then you need to add that line somewhere in the file: network_administrators ALL=(ALL) NOPASSWD: ALL
upvoted 1 times
...
...
Sfutrell
4 years, 1 month ago
A and D are correct, once you add the group to the wheel group, you use the ALL directive which applies to the wheel group, allowing users to run ALL commands defined there, it should already be in the file, just commented out.
upvoted 4 times
...
vijaycujo
4 years, 4 months ago
https://www.tecmint.com/run-sudo-command-without-password-linux/
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago