PT0-003 · Question #241
PT0-003 Question #241: Real Exam Question with Answer & Explanation
The correct answer is D: cat /etc/passwd. cat /etc/passwd is the correct command because the /etc/passwd file stores detailed user account information, including the username, user ID, group ID, home directory path, and default shell - exactly what the question asks for. This makes it the go-to file for enumerating compl
Question
A penetration tester gains access to a Linux computer system. The tester then attempts to enumerate user accounts, including the directories and user default shell. Which of the following commands should the tester use to enumerate user accounts?
Options
- Acat /etc/shadow
- Bls /var/usr
- Cls /home
- Dcat /etc/passwd
Explanation
cat /etc/passwd is the correct command because the /etc/passwd file stores detailed user account information, including the username, user ID, group ID, home directory path, and default shell - exactly what the question asks for. This makes it the go-to file for enumerating complete user account details on a Linux system.
Why the other options are wrong:
- A.
cat /etc/shadowcontains encrypted password hashes, not user account details like home directories or shells - it's used for password cracking, not account enumeration. - B.
ls /var/usris not a standard Linux directory path and would likely return an error or irrelevant results. - C.
ls /homeonly lists home directory names, giving you a partial user list but none of the shell or full account details the question requires.
Memory Tip: Think of /etc/passwd as the "passport file" - just like a passport contains a person's identifying details, /etc/passwd contains all the key details about every user on the system. If you need full user profile info (directory + shell), always reach for /etc/passwd.
Topics
Community Discussion
No community discussion yet for this question.