102-500 Exam QuestionsBrowse all questions from this exam

102-500 Exam - Question 112


Which of the following getent invocations lists all existing users?

Show Answer
Correct Answer: C

The correct getent invocation to list all existing users is 'getent passwd'. The 'passwd' database in getent contains entries of all the system users, providing necessary details such as username, password, user ID, group ID, user ID info, home directory, and the login shell. None of the other provided options (homes, uids, users, logins) correspond to a valid getent database.

Discussion

4 comments
Sign in to comment
CuriousLinuxCatOption: C
Aug 7, 2021

Correct answer is C. All the other answers do not exist in the 'getent' command. Tested on Ubuntu 20.04. Getent allows the user to get entries from important text files called databases. It is a common way to look up user details on Linux. See here for more examples: https://www.geeksforgeeks.org/getent-command-in-linux-with-examples/

drliu1202Option: C
Aug 1, 2022

https://man.openbsd.org/getent.1

CuriousLinuxCatOption: C
Aug 7, 2021

Correct answer is C. All the other answers do not exist in the 'getent' command. Tested on Ubuntu 20.04. Getent allows the user to get entries from important text files called databases. It is a common way to look up user details on Linux. See here for more examples: https://www.geeksforgeeks.org/getent-command-in-linux-with-examples/

iwkno6Option: C
Aug 28, 2021

C is correct