Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

CompTIA XK0-006 Exam - Topic 2 Question 5 Discussion

Actual exam question for CompTIA's XK0-006 exam
Question #: 5
Topic #: 2
[All XK0-006 Questions]

An administrator needs to verify the user ID, home directory, and assigned shell for the user named "accounting." Which of the following commands should the administrator use to retrieve this information?

Show Suggested Answer Hide Answer
Suggested Answer: A

User account information is centrally stored in the system's account databases, and Linux+ V8 emphasizes the use of standard tools to query this data safely and consistently.

The getent passwd accounting command retrieves the user's entry from the passwd database, which may be sourced from local files or network services such as LDAP. This entry includes the username, user ID (UID), group ID (GID), home directory, and assigned login shell. Therefore, option A provides all the requested information in a single command.

Option B, id accounting, displays the UID and group memberships but does not show the home directory or assigned shell. Option C is incorrect because /etc/shadow contains password hashes and expiration data, not shell or home directory information. Option D, who accounting, only shows login sessions and does not provide account configuration details.

Linux+ V8 documentation highlights getent passwd as the preferred method for retrieving comprehensive user account information because it works across different authentication backends.

Thus, the correct answer is A.


Contribute your Thoughts:

0/2000 characters
Noah
18 days ago
I agree, that's the best way to get all that info.
upvoted 0 times
...
Shalon
23 days ago
A) getent passwd accounting is the right choice!
upvoted 0 times
...
Lavonda
1 month ago
I vaguely recall that who is for logged-in users, so it probably won't help with this question.
upvoted 0 times
...
Colette
2 months ago
I feel like grep might be useful, but isn't that more for password info rather than user details?
upvoted 0 times
...
Mammie
2 months ago
I remember practicing with the id command, but I don't think it shows the home directory.
upvoted 0 times
...
Ettie
2 months ago
I think the command to check user details is getent, but I'm not entirely sure if it's the best choice here.
upvoted 0 times
...

Save Cancel