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

Currently there are no comments in this discussion, be the first to comment!


Save Cancel