nerdexam
CompTIA

XK0-005 · Question #600

Which of the following commands should a technician use to create an administrative account for the username Joe?

The correct answer is A. sudo useradd -G wheel joe. The -G wheel option adds the user joe to the wheel group, which is a special group that allows users to execute administrative commands using sudo. This is the correct way to create a user with administrative privileges in many Linux distributions, including Red Hat-based ones.

System Management

Question

Which of the following commands should a technician use to create an administrative account for the username Joe?

Options

  • Asudo useradd -G wheel joe
  • Bsudo useradd joe; sudo passwd -l joe
  • Csudo useradd joe; sudo cat key.pem > ~/.ssh/authorized_keys
  • Dsudo useradd joe; groupadd admin joe

How the community answered

(29 responses)
  • A
    86% (25)
  • B
    3% (1)
  • C
    7% (2)
  • D
    3% (1)

Explanation

The -G wheel option adds the user joe to the wheel group, which is a special group that allows users to execute administrative commands using sudo. This is the correct way to create a user with administrative privileges in many Linux distributions, including Red Hat-based ones.

Topics

#useradd#group management#sudo privileges#account creation

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice