102-500 · Question #23
Depending on a system's configuration, which of the following files can be used to enable and disable network services running on this host?
The correct answer is D. /etc/services. Note: The marked answer D appears to be incorrect. /etc/services is a port-to-service-name mapping file (e.g., ssh 22/tcp) that applications use as a lookup table - it does not enable or disable services. The correct answer from this list is B: /etc/xinetd.conf…
Question
Options
- A/etc/profile
- B/etc/xinetd.conf
- C/etc/ports
- D/etc/services
- E/etc/host.conf
How the community answered
(37 responses)- A3% (1)
- B14% (5)
- C3% (1)
- D73% (27)
- E8% (3)
Explanation
Note: The marked answer D appears to be incorrect. /etc/services is a port-to-service-name mapping file (e.g., ssh 22/tcp) that applications use as a lookup table - it does not enable or disable services. The correct answer from this list is B: /etc/xinetd.conf.
/etc/xinetd.conf is the configuration file for the xinetd "super-daemon," which acts as a gatekeeper for network services. Individual services listed there (or in /etc/xinetd.d/) can be toggled on or off with disable = yes/no, directly controlling what network services are accessible on the host. The question's phrase "depending on a system's configuration" refers to the fact that not all systems use xinetd (older systems used /etc/inetd.conf instead).
The other distractors are wrong because: /etc/profile sets shell environment variables for user logins; /etc/ports is not a standard Linux file; /etc/services maps port numbers to names but does not control service state; /etc/host.conf configures the order of name resolution (DNS vs /etc/hosts).
Memory tip: Think "xinetd**.conf** = network services configuration." The inet in the filename is short for internet, making it the natural home for controlling internet (network) services. If you see inetd or xinetd in an answer, that's your service-gating daemon.
If your exam truly marks D as correct, flag it - that answer key contains an error.
Topics
Community Discussion
No community discussion yet for this question.