What's the services file in the OSes for?

ugh

Platinum Member
Feb 6, 2000
2,563
0
0
Hi all,

As message title. Anyone knows what it does besides listing down all the services and the ports and the protocol? WHat happens if you remove/add/edit the entries in the file?
 

Mrburns2007

Platinum Member
Jun 14, 2001
2,595
0
0
What service file ?

Maybe a little more info what OS your using and what your program your talking about.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
besides listing down all the services and the ports and the protocol?

Basically that's it, I don't know about Windows but unixes use that file to answer getservbyname (3), getservbyport (3) and getservent (3) function calls, so if you change one your machine will think the default port for a service is different than what everyone else in the world thinks it is.
 

ugh

Platinum Member
Feb 6, 2000
2,563
0
0


<< Basically that's it, I don't know about Windows but unixes use that file to answer getservbyname (3), getservbyport (3) and getservent (3) function calls, so if you change one your machine will think the default port for a service is different than what everyone else in the world thinks it is. >>


OIC. I suppose Windows has its own API to access those stuff like in UNIX . If I delete say the telnet entry, does that mean that I will not be able to telnet to other boxes since the OS cannot find the default port/protocol?


Mrburns2007: AFAIK, it's in most of the OSes listing down all/most of the services i.e.telnet, ftp, ssl, http and their properties. In UNIX, it's in /etc/services while in NT/Win2k it's in WINNT\system32\drivers\etc\services.

 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0


<<

<< Basically that's it, I don't know about Windows but unixes use that file to answer getservbyname (3), getservbyport (3) and getservent (3) function calls, so if you change one your machine will think the default port for a service is different than what everyone else in the world thinks it is. >>


OIC. I suppose Windows has its own API to access those stuff like in UNIX . If I delete say the telnet entry, does that mean that I will not be able to telnet to other boxes since the OS cannot find the default port/protocol?


Mrburns2007: AFAIK, it's in most of the OSes listing down all/most of the services i.e.telnet, ftp, ssl, http and their properties. In UNIX, it's in /etc/services while in NT/Win2k it's in WINNT\system32\drivers\etc\services.
>>



Try it and find out for sure, but you should be able to.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
If I delete say the telnet entry, does that mean that I will not be able to telnet to other boxes since the OS cannot find the default port/protocol?

Not necessarily, it depends on how the program was coded, but if it was coded properly (i.e. not with port 23 hard coded as the default) then yea it will fail.