While reviewing a server's sudo configuration, you need to confirm that the service account "deploy" is a member of the docker administrators group. The report must show the primary group first, any supplementary groups after it, and must be prefixed by the user name and a colon, for example:
deploy : deploy docker wheel
Which single command will produce this exact style of output?
The groups utility prints the names of the primary and any supplementary groups for a specified user. When a user name is supplied, the utility places that name and a colon in front of the list (e.g., deploy : …).
id -Gn deploy also shows group names, but it omits the user-name prefix, so it does not meet the stated formatting requirement. id -G deploy returns numeric GIDs instead of names, and getent group deploy queries the group database for a group named "deploy" rather than listing the groups that the user belongs to.
Therefore, only groups deploy satisfies all the criteria.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the purpose of the `groups` command in Linux?
Open an interactive chat with Bash
How is the `groups` command different from `id -Gn`?
Open an interactive chat with Bash
What does the difference between primary and supplementary groups mean in Linux?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
Services and User Management
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access