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.
Submit