Stop Microsoft
Operating Systems => Linux and UNIX => Topic started by: RudeCat7 on 25 November 2002, 06:52
-
What file contains the list of port numbers (and associated names) monitored by "inetd"?
a) /etc/hosts
b) /etc/nsswitch.conf/
c) /etc/nsorder
d) /etc/services
e) /etc/inetd.conf
We may have to let Void Main answer this one.
-
This is an extremely easy one. I'll let someone else answer. It certainly wouldn't be hard for someone to check each of the file names contained within the answers and figure it out on their own though.
-
hermmm, /etc/services?
and im geussing its supposed to be /etc/xinetd.conf or something, iv been playing with a bsd machine so, im probably talking from my ass
-
Correct, /etc/services, it's the same on BSD and every other UNIX system I have ever used. Actually it's pretty much standard on all TCP/IP based systems, even Windows (except the services file is in a different directory in Windows, NT* systems have it in C:\WINNT\SYSTEM32\DRIVERS\ETC, of course).
You are also right that newer Linux systems are using xinetd over inetd and it's main configuration file is /etc/xinetd.conf but the configuration for each xinetd service is in it's own separate file under /etc/xinetd.d/. The contents of each of those files used to be a single line in /etc/inetd.conf.
Of course many other TCP/IP programs use the /etc/services file. The "netstat" command for instance uses it to turn port numbers into names. If you didn't have the services file there all you would see are numbers. For instance "http" would show up as "80".
[ November 24, 2002: Message edited by: void main ]