Services and User Management

A junior developer named mchen joins a team. On a RHEL-based server, the administrator must create the account with a home directory, /bin/bash as the login shell, and developers as a supplementary group. The user's primary group must remain the default private group. Which command meets these requirements?

Show the answer

Correct answerA. useradd -m -s /bin/bash -G developers mchen

-m creates the home directory, -s sets the shell, and -G adds supplementary groups while the default private primary group is kept. A lowercase -g would make developers the primary group, which breaks the requirement. -a is a usermod option, so useradd rejects it.